We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57fcf46 commit d1a61dcCopy full SHA for d1a61dc
1 file changed
backend/src/middleware/errorHandler.ts
@@ -29,6 +29,9 @@ export function errorHandler(
29
return;
30
}
31
32
- const details = isProduction() ? undefined : { cause: message || "unknown" };
+ const details = isProduction()
33
+ ? undefined
34
+ : { cause: error.message || "unknown" };
35
+ const appError = AppError.internal("Erro interno.", details);
36
res.status(appError.statusCode).json(appError.toJSON());
37
0 commit comments