Sfoglia il codice sorgente

Re-fix errorMiddleware (#3922)

master
Takuya Yoshida 6 anni fa
committed by Eugen Rochko
parent
commit
e5563843a2
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      streaming/index.js

+ 1
- 1
streaming/index.js Vedi File

@@ -246,7 +246,7 @@ const startWorker = (workerId) => {
accountFromRequest(req, next);
};

const errorMiddleware = (err, req, res, next) => { // eslint-disable-line no-unused-vars
const errorMiddleware = (err, req, res, {}) => {
log.error(req.requestId, err.toString());
res.writeHead(err.statusCode || 500, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: err.statusCode ? err.toString() : 'An unexpected error occurred' }));


Caricamento…
Annulla
Salva