From 250107432623a6af54db12bb005a091ba7ea2a2f Mon Sep 17 00:00:00 2001 From: ahmed-envoy <96131446+ahmed-envoy@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:49:20 -0400 Subject: [PATCH] fix: include some error.request fields (#39) --- package.json | 2 +- src/util/axiosConstructor.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f570b61..694c3b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@envoy/envoy-integrations-sdk", - "version": "2.0.0-beta.28", + "version": "2.0.0-beta.29", "description": "SDK for building Envoy integrations.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/util/axiosConstructor.ts b/src/util/axiosConstructor.ts index e3d086f..5dc8cd0 100644 --- a/src/util/axiosConstructor.ts +++ b/src/util/axiosConstructor.ts @@ -7,6 +7,11 @@ export function createAxiosClient(config?: AxiosRequestConfig | undefined): Axio }, (error) => { const safeError = { code: error.code, + request: { + baseURL: error.request?.baseURL, + url: error.request?.url, + method: error.request?.method, + }, response: { code: error.response?.code, status: error.response?.status,