chore(apps/app): drop unnecessary async on synchronous error handlers
Both interceptor error handlers in lib/axios.ts were declared `async` but contain zero `await` calls — the request handler just rethrows, and the response handler walks a synchronous status-code branching tree before rethrowing. axios accepts both sync and async handler signatures, so dropping the keyword is mechanical and behavior-neutral. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ export function registerInterceptors(client: AxiosInstance, deps: AxiosBindingsD
|
||||
|
||||
return config
|
||||
},
|
||||
async error => { throw error },
|
||||
error => { throw error },
|
||||
)
|
||||
|
||||
client.interceptors.response.use(
|
||||
@@ -51,7 +51,7 @@ export function registerInterceptors(client: AxiosInstance, deps: AxiosBindingsD
|
||||
|
||||
return response
|
||||
},
|
||||
async error => {
|
||||
error => {
|
||||
if (import.meta.env.DEV)
|
||||
console.error(`❌ ${error.response?.status} ${error.config?.url}`, error.response?.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user