Skip to content

Commit

Permalink
Brute store error is an internal server error (#9092)
Browse files Browse the repository at this point in the history
no issue
- If the brute store throws an error and the `handleStoreError` is called, then the storage is unable to get/set values.
- This is not a PermissionError. The result is that the user has no access, because the brute store has problems reading/writing to the storage.
  • Loading branch information
kirrg001 authored and kevinansfield committed Oct 4, 2017
1 parent c4b2e80 commit 3d6227e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/server/middleware/api/spam-prevention.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var moment = require('moment'),
spamConfigKeys = ['freeRetries', 'minWait', 'maxWait', 'lifetime'];

handleStoreError = function handleStoreError(err) {
var customError = new errors.NoPermissionError({
var customError = new errors.InternalServerError({
message: 'Unknown error',
err: err.parent ? err.parent : err
});
Expand All @@ -36,7 +36,6 @@ handleStoreError = function handleStoreError(err) {
// we are using reset as synchronous call, so we have to log the error if it occurs
// there is no way to try/catch, because the reset operation happens asynchronous
if (!err.next) {
err.level = 'critical';
logging.error(err);
return;
}
Expand Down

0 comments on commit 3d6227e

Please sign in to comment.