diff --git a/packages/bruno-electron/src/ipc/network/axios-instance.js b/packages/bruno-electron/src/ipc/network/axios-instance.js index 90ca1afea..f4810becd 100644 --- a/packages/bruno-electron/src/ipc/network/axios-instance.js +++ b/packages/bruno-electron/src/ipc/network/axios-instance.js @@ -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);