Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 0bc9f07

Browse files
committed
fix: improve error handling by using localized message in GlobalExceptionHandler
1 parent 4ba1618 commit 0bc9f07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/example/springprojectsteganographytool/exceptions/GlobalExceptionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public ProblemDetail handleGeneric(
153153
// logger.error("Unhandled exception", ex);
154154
var pd = ProblemDetail.forStatusAndDetail(
155155
HttpStatus.INTERNAL_SERVER_ERROR,
156-
"An unexpected error occurred."
156+
ex.getLocalizedMessage()
157157
);
158158
var traceId = MDC.get("traceId");
159159

0 commit comments

Comments
 (0)