Skip to content

Commit

Permalink
improve query error to only delete if are 500 error
Browse files Browse the repository at this point in the history
  • Loading branch information
albertosouza committed Feb 28, 2018
1 parent a1663c4 commit 5935155
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/responses/methods/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,9 @@ module.exports = {
res.status(400);
} else {
res.status(500);
delete res.locals.data;
}

delete res.locals.data;

res.format(req.we.responses.formaters);

req.we.freeResponseMemory(req, res);
Expand Down

0 comments on commit 5935155

Please sign in to comment.