Skip to content

Commit

Permalink
More jakarta error msg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinsINT committed Nov 13, 2024
1 parent 78d17b4 commit 854d5c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class ApplicationController : ErrorController, Logging {
jakartaErrorMsg = null
}
val springException = request.getAttribute("org.springframework.web.servlet.DispatcherServlet.EXCEPTION") as Exception?
val errorMsg = jakartaErrorMsg ?: jakartaException?.cause?.message ?: springException?.message ?: "No error message available."
val errorMsg = jakartaErrorMsg ?: jakartaException?.cause?.message ?: springException?.message ?: jakartaException?.message ?: "No error message available."
return ErrorResponse(statusCode, errorMsg)
}
}
Expand Down

0 comments on commit 854d5c3

Please sign in to comment.