Skip to content

Commit 4ad9300

Browse files
committed
HOTFIX: 에러 반환 오류 해결
1 parent 70213ae commit 4ad9300

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/site/billilge/api/backend/global/security/jwt/TokenAuthenticationFilter.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ class TokenAuthenticationFilter(
3939

4040
@Throws(IOException::class)
4141
private fun handleException(response: HttpServletResponse, exception: ApiException) {
42-
val errorResponse = ErrorResponse.from(exception)
42+
val errorResponse = ErrorResponse.from(exception.errorCode)
4343

4444
val content = ObjectMapper().writeValueAsString(errorResponse)
4545

4646
response.addHeader("Content-Type", "application/json; charset=utf-8")
47+
response.status = exception.errorCode.httpStatus.value()
4748
response.writer.write(content)
4849
response.writer.flush()
4950
}

0 commit comments

Comments
 (0)