From 8eb73a6b3ce8a44ef08fa1b5d023e62cb8f7a3df Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Thu, 25 Feb 2021 12:55:34 +0300 Subject: [PATCH] fix(RequestClient): add catch block to authorize method --- src/request/RequestClient.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/request/RequestClient.ts b/src/request/RequestClient.ts index a92fd5e..98a7fd7 100644 --- a/src/request/RequestClient.ts +++ b/src/request/RequestClient.ts @@ -346,7 +346,9 @@ export class RequestClient implements HttpClient { }) if (isAuthorizeFormRequired(res?.data as string)) { - await this.authorize(res.data as string) + await this.authorize(res.data as string).catch((err) => { + throw prefixMessage(err, 'Error while authorizing request. ') + }) } return await callback().catch((err: any) => {