mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-15 16:22:25 +02:00
Restore error message when auth proxy header is missing
This commit is contained in:
5
resources/js/services/httpClientFactory.js
vendored
5
resources/js/services/httpClientFactory.js
vendored
@ -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) {
|
||||
|
Reference in New Issue
Block a user