Restore error message when auth proxy header is missing

This commit is contained in:
Bubka
2023-12-29 00:31:30 +01:00
parent 5fd7f43968
commit 308bf3c436
3 changed files with 23 additions and 6 deletions

View File

@ -51,6 +51,11 @@ export const httpClientFactory = (endpoint = 'api') => {
await axios.get('/refresh-csrf')
return httpClient.request(originalRequestConfig)
}
if (error.response && [407].includes(error.response.status)) {
useNotifyStore().error(error)
return new Promise(() => {})
}
// Return the error when we need to handle it at component level
if (error.config.hasOwnProperty('returnError') && error.config.returnError === true) {