From de07ccac8e616dfe543327bd542aed452c4b4de7 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Mon, 4 May 2026 22:40:12 +0200 Subject: [PATCH] chore(apps/app): drop unnecessary async on synchronous error handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/app/src/lib/axios.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/lib/axios.ts b/apps/app/src/lib/axios.ts index 95533e74..28e2f6cd 100644 --- a/apps/app/src/lib/axios.ts +++ b/apps/app/src/lib/axios.ts @@ -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)