Add not implemented error code

This commit is contained in:
Girish Ramakrishnan
2019-10-24 18:40:37 -07:00
parent ad9097d212
commit c3a5360a88
2 changed files with 2 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ function hasScopes(authorizedScopes, requiredScopes) {
// this allows apps:write if the token has a higher apps scope
if (authorizedScopes.indexOf(requiredScopes[i]) === -1 && authorizedScopes.indexOf(scopeParts[0]) === -1) {
debug('scope: missing scope "%s".', requiredScopes[i]);
return new Error('Missing required scope "' + requiredScopes[i] + '"');
return new BoxError(BoxError.NOT_FOUND, 'Missing required scope "' + requiredScopes[i] + '"');
}
}