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) }