fix: adding comprehensive logs for live server (#7947)

* fix: adding comprehensive logs

* fix: document controller naming convention

* fix: axios interception logger
This commit is contained in:
sriram veeraghanta 2025-10-10 18:28:52 +05:30 committed by GitHub
parent 9ce6179421
commit 8cd29c5009
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 112 additions and 72 deletions

View file

@ -1,4 +1,5 @@
import axios, { AxiosInstance } from "axios";
import { logger } from "@plane/logger";
import { env } from "@/env";
export abstract class APIService {
@ -13,6 +14,17 @@ export abstract class APIService {
withCredentials: true,
timeout: 20000,
});
this.setupInterceptors();
}
private setupInterceptors() {
this.axiosInstance.interceptors.response.use(
(response) => response,
(error) => {
logger.error("AXIOS_ERROR:", error);
return Promise.reject(error);
}
);
}
setHeader(key: string, value: string) {