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:
parent
9ce6179421
commit
8cd29c5009
10 changed files with 112 additions and 72 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue