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 70213ae commit 4ad9300Copy full SHA for 4ad9300
src/main/kotlin/site/billilge/api/backend/global/security/jwt/TokenAuthenticationFilter.kt
@@ -39,11 +39,12 @@ class TokenAuthenticationFilter(
39
40
@Throws(IOException::class)
41
private fun handleException(response: HttpServletResponse, exception: ApiException) {
42
- val errorResponse = ErrorResponse.from(exception)
+ val errorResponse = ErrorResponse.from(exception.errorCode)
43
44
val content = ObjectMapper().writeValueAsString(errorResponse)
45
46
response.addHeader("Content-Type", "application/json; charset=utf-8")
47
+ response.status = exception.errorCode.httpStatus.value()
48
response.writer.write(content)
49
response.writer.flush()
50
}
0 commit comments