make requestPending into HTTP error to work with l-m retry
This commit is contained in:
parent
1d323b0647
commit
25d782a2c5
2 changed files with 6 additions and 3 deletions
|
|
@ -360,7 +360,11 @@ function getFingerprint (req) {
|
|||
|
||||
function cachedResponse (req, res, next) {
|
||||
return plugins.cachedResponse(session(req), req.path, req.method)
|
||||
.then(r => r.body ? res.json(r.body) : next())
|
||||
.then(r => {
|
||||
if (!r.body) return next()
|
||||
if (r.body.pendingRequest) return res.sendStatus(409)
|
||||
res.json(r.body)
|
||||
})
|
||||
}
|
||||
|
||||
function cacheResponse (req, body) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue