mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
🐛 do not return error on handleStoreError, throw it!
- ghost hangs if handleStoreError get's called - we have to throw the error!
This commit is contained in:
parent
c749fe2a45
commit
cab46894f5
1 changed files with 5 additions and 1 deletions
|
@ -23,8 +23,12 @@ var ExpressBrute = require('express-brute'),
|
|||
logging = require('../../logging'),
|
||||
spamConfigKeys = ['freeRetries', 'minWait', 'maxWait', 'lifetime'];
|
||||
|
||||
// weird, but true
|
||||
handleStoreError = function handleStoreError(err) {
|
||||
return new errors.NoPermissionError({message: 'DB error', err: err});
|
||||
err.next(new errors.NoPermissionError({
|
||||
message: 'Unknown error',
|
||||
err: err.parent ? err.parent : err
|
||||
}));
|
||||
};
|
||||
|
||||
// This is a global endpoint protection mechanism that will lock an endpoint if there are so many
|
||||
|
|
Loading…
Reference in a new issue