mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-21 20:41:41 +02:00
Fixed error handling
This commit is contained in:
parent
ff3321d643
commit
bd5bc4acb2
@ -23,9 +23,9 @@ function makeAxiosInstance() {
|
|||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
if (error.response) {
|
||||||
const end = Date.now();
|
const end = Date.now();
|
||||||
const start = error.config.headers['request-start-time'];
|
const start = error.config.headers['request-start-time'];
|
||||||
if (error.response) {
|
|
||||||
error.response.headers['request-duration'] = end - start;
|
error.response.headers['request-duration'] = end - start;
|
||||||
}
|
}
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user