From 25624b352f9170411a4dccfe093061bd3ec566c3 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Tue, 28 Jan 2025 00:26:50 +0330 Subject: [PATCH] Updated --- frontend/plugins/axios.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/plugins/axios.ts b/frontend/plugins/axios.ts index 16ac61c..04e524b 100644 --- a/frontend/plugins/axios.ts +++ b/frontend/plugins/axios.ts @@ -1,6 +1,7 @@ import axiosOriginal from "axios"; import { useAuth } from "~/composables/api/auth/useAuth"; import { API_ENDPOINTS } from "~/constants"; +import Logger from "~/tools/logger"; export default defineNuxtPlugin(() => { const config = useRuntimeConfig(); @@ -23,7 +24,9 @@ export default defineNuxtPlugin(() => { axios.interceptors.response.use((response) => { return response; - }, function(error) { + }, async function(error) { + + await Logger.axiosErrorLog(error); // if (error.status === 401) { // logout();