Run logger when debug is true
This commit is contained in:
@@ -29,11 +29,10 @@ export default defineNuxtPlugin(() => {
|
||||
return response;
|
||||
},
|
||||
async function(error) {
|
||||
await Logger.axiosErrorLog(error);
|
||||
|
||||
// if (error.status === 401) {
|
||||
// logout();
|
||||
// }
|
||||
if (config.public.DEBUG === "true" && import.meta.server) {
|
||||
await Logger.axiosErrorLog(error);
|
||||
}
|
||||
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user