Skip to content

Commit 57fcf46

Browse files
BenevanioCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Benevanio <benevaniosantos930@gmail.com>
1 parent f56f850 commit 57fcf46

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

backend/src/middleware/errorHandler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export function errorHandler(
2929
return;
3030
}
3131

32-
const details = isProduction()
33-
? undefined
34-
: { cause: error.message || "unknown" };
35-
const appError = AppError.internal("Erro interno.", details);
32+
const details = isProduction() ? undefined : { cause: message || "unknown" };
3633
res.status(appError.statusCode).json(appError.toJSON());
3734
}

0 commit comments

Comments
 (0)