From 149f9c9304c1a29560c6ca4c765814beb74185d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=84=EC=84=B1?= Date: Tue, 12 Dec 2023 23:04:33 +0900 Subject: [PATCH] =?UTF-8?q?#86=20fix=20:=20authorized=20error=20code=20?= =?UTF-8?q?=EC=9E=AC=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: yy0ung Co-authored-by: BENDENG1 --- .../java/com/avengers/nibobnebob/config/BearerInterceptor.kt | 2 +- .../main/java/com/avengers/nibobnebob/data/model/runRemote.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/config/BearerInterceptor.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/config/BearerInterceptor.kt index c8e2ee70..fab62714 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/config/BearerInterceptor.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/config/BearerInterceptor.kt @@ -86,7 +86,7 @@ class BearerInterceptor @Inject constructor( } companion object { - const val TOKEN_ERROR = 403 + const val TOKEN_ERROR = 401 const val AUTHORIZATION = "Authorization" const val BEARER = "Bearer" } diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/data/model/runRemote.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/data/model/runRemote.kt index 46ff80bf..a0a1938b 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/data/model/runRemote.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/data/model/runRemote.kt @@ -16,7 +16,7 @@ suspend fun runRemote(block: suspend () -> Response): BaseState { } else { val errorData = Gson().fromJson(response.errorBody()?.string(), BaseState.Error::class.java) when(response.code()){ - 403 -> BaseState.Error(StatusCode.ERROR_AUTH, errorData.message) + 401 -> BaseState.Error(StatusCode.ERROR_AUTH, errorData.message) 404 -> BaseState.Error(StatusCode.ERROR_NONE, errorData.message) else -> BaseState.Error(StatusCode.ERROR, errorData.message) }