Improve devices error handling

This commit is contained in:
Johannes Zellner
2024-12-06 12:51:42 +01:00
parent de0909248d
commit 146afce934
2 changed files with 3 additions and 3 deletions

View File

@@ -486,7 +486,7 @@ function validateTags(tags) {
function validateDevices(devices) {
for (const key in devices) {
if (key.indexOf('/dev/' !== 0)) return new BoxError(BoxError.BAD_FIELD, 'devices must start with /dev/');
if (key.indexOf('/dev/') !== 0) return new BoxError(BoxError.BAD_FIELD, `"${key}" must start with /dev/`);
}
return null;