Brute store error is an internal server error (#9092)

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.
This commit is contained in:
Katharina Irrgang 2017-10-04 11:02:22 +02:00 committed by Kevin Ansfield
parent c4b2e8035d
commit 3d6227e11b

View File

@ -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
});
@ -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;
}