From 8dc8fd957e91a1f78da84ec72ea21e053e0c8ba3 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 22:57:01 +0900 Subject: [PATCH] =?UTF-8?q?#86=20fix=20:=20authorized=20error=20code=20?= =?UTF-8?q?=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 --- Aos/app/build.gradle.kts | 2 +- .../java/com/avengers/nibobnebob/config/BearerInterceptor.kt | 2 +- .../main/java/com/avengers/nibobnebob/data/model/runRemote.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Aos/app/build.gradle.kts b/Aos/app/build.gradle.kts index 2743e11b..5f9c0267 100644 --- a/Aos/app/build.gradle.kts +++ b/Aos/app/build.gradle.kts @@ -24,7 +24,7 @@ android { minSdk = 24 targetSdk = 34 versionCode = 1 - versionName = "1.0.1" + versionName = "1.0.3" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" buildConfigField("String", "NAVER_LOGIN_CLIENT_ID", getProperty("naverLoginClientId")) 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 fab62714..c8e2ee70 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 = 401 + const val TOKEN_ERROR = 403 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 a0a1938b..46ff80bf 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()){ - 401 -> BaseState.Error(StatusCode.ERROR_AUTH, errorData.message) + 403 -> BaseState.Error(StatusCode.ERROR_AUTH, errorData.message) 404 -> BaseState.Error(StatusCode.ERROR_NONE, errorData.message) else -> BaseState.Error(StatusCode.ERROR, errorData.message) }