mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 20:27:12 +00:00
print all errors during backend dev
This commit is contained in:
@@ -9,7 +9,7 @@ import { NODE_ENV } from "../config";
|
|||||||
|
|
||||||
export const requestErrorHandler: ErrorRequestHandler = (error: RequestError | Error, req, res, next) => {
|
export const requestErrorHandler: ErrorRequestHandler = (error: RequestError | Error, req, res, next) => {
|
||||||
if (res.headersSent) return next();
|
if (res.headersSent) return next();
|
||||||
if (NODE_ENV !== "production" && error instanceof RequestError) {
|
if (NODE_ENV !== "production") {
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
console.log(error)
|
console.log(error)
|
||||||
/* eslint-enable no-console */
|
/* eslint-enable no-console */
|
||||||
|
|||||||
Reference in New Issue
Block a user