mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
added more logging when an error is passed to next, specifically useful for debugging csrf stuff
This commit is contained in:
@@ -14,7 +14,7 @@ argv = require("optimist")
|
||||
.argv
|
||||
|
||||
Server.app.use (error, req, res, next) ->
|
||||
logger.error err: error
|
||||
logger.error err: error, url:req.url, method:req.method, user:req?.sesson?.user, "error passed to top level next middlewear"
|
||||
res.statusCode = error.status or 500
|
||||
if res.statusCode == 500
|
||||
res.end("Oops, something went wrong with your request, sorry. If this continues, please contact us at team@sharelatex.com")
|
||||
|
||||
Reference in New Issue
Block a user