This commit is contained in:
2024-12-11 10:15:23 +01:00
parent a38bdf5a0b
commit e0ccb51b14
+7 -5
View File
@@ -121,11 +121,13 @@ class RestService {
private async request<T>(method: Method, url: string, data?: any, headers?: any): Promise<T> { private async request<T>(method: Method, url: string, data?: any, headers?: any): Promise<T> {
try { try {
const response = await this.api.request<T>({ const response = await this.api.request<T>({
method, method,
url, url,
data, data,
headers, headers,
}); validateStatus: (status) => status >= 200 && status < 500,
}
);
return response.data; return response.data;
} catch (error) { } catch (error) {
console.error('Error during request:', error); console.error('Error during request:', error);