forked from extern/bruno
Merge pull request #518 from dozed/fix/error-handling
Fixed error handling
This commit is contained in:
commit
1979be6c4b
@ -23,9 +23,9 @@ function makeAxiosInstance() {
|
||||
return response;
|
||||
},
|
||||
(error) => {
|
||||
const end = Date.now();
|
||||
const start = error.config.headers['request-start-time'];
|
||||
if (error.response) {
|
||||
const end = Date.now();
|
||||
const start = error.config.headers['request-start-time'];
|
||||
error.response.headers['request-duration'] = end - start;
|
||||
}
|
||||
return Promise.reject(error);
|
||||
|
Loading…
Reference in New Issue
Block a user