Skip to content

Commit

Permalink
feat(error): Updated error message on wrong format
Browse files Browse the repository at this point in the history
  • Loading branch information
Sccttt committed May 7, 2024
1 parent fc4ba2a commit 1b3a780
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/middleware/put-uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module.exports = function createPutUploader(backendFactory) {
next(new restifyErrors.BadDigestError('Zero sized upload'))
}
if (error.name === 'ForbiddenType') {
next(new restifyErrors.NotAuthorizedError(error.message))
// next(new restifyErrors.NotAuthorizedError(error.message))
res.send(415, error.message) // Directly send 415 status code
return
}
backendFactory.logger.error(error, 'PUT error')
next(new restifyErrors.HttpError('Unknown Error'))
Expand Down

0 comments on commit 1b3a780

Please sign in to comment.