From bd5bc4acb2e2ca66615d50e747f00b93a00a20bf Mon Sep 17 00:00:00 2001 From: Stefan Ollinger Date: Tue, 10 Oct 2023 21:51:32 +0200 Subject: [PATCH] Fixed error handling --- packages/bruno-electron/src/ipc/network/axios-instance.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);