Commit ba59543a authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: ensure Axios response interceptor is used

parent 88295a48
import axios from 'axios';
import ApiError from 'model/ApiError';
axios.interceptors.response.use((response) => {
return response;
}, (error) => {
return Promise.reject(ApiError.axiosError(error));
});
import axios from 'axios';
import ApiError from 'model/ApiError';
axios.interceptors.response.use((response) => {
return response;
}, (error) => {
return Promise.reject(ApiError.axiosError(error));
});
/**
* Default Axios configuration for accessing the backend API
*/
......@@ -18,7 +26,7 @@ axiosBackend.interceptors.request.use((config) => {
return config;
}, (error) => {
// Do something with request error
return Promise.reject(error);
return Promise.reject(ApiError.axiosError(error));
});
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment