From 3e2d961a2eeb970e2a711e596cf5af4736785721 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 23 Dec 2021 20:11:18 +0200 Subject: [PATCH 1/2] fixed error, not using createAxiosRetry() when not using register/registerAsync() --- lib/http.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http.module.ts b/lib/http.module.ts index 065d4b7..7827b19 100644 --- a/lib/http.module.ts +++ b/lib/http.module.ts @@ -14,7 +14,7 @@ import { } from './interfaces'; import axiosRetry from 'axios-retry'; -const createAxiosRetry = (config: HttpModuleOptions) => { +const createAxiosRetry = (config?: HttpModuleOptions) => { const axiosInstance = Axios.create(config); axiosRetry(axiosInstance, config); return axiosInstance; @@ -25,7 +25,7 @@ const createAxiosRetry = (config: HttpModuleOptions) => { HttpService, { provide: AXIOS_INSTANCE_TOKEN, - useValue: Axios, + useValue: createAxiosRetry(), }, ], exports: [HttpService], From 71aec818abe27970a0cd7f607740ee614440afc5 Mon Sep 17 00:00:00 2001 From: benhason1 <50466724+benhason1@users.noreply.github.com> Date: Thu, 23 Dec 2021 20:15:23 +0200 Subject: [PATCH 2/2] Updated minor version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 925c662..880aa0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-http-promise", - "version": "1.1.0", + "version": "1.1.1", "keywords": [ "nestjs", "http",