1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-04 11:10:05 +00:00

Merge pull request #266 from sasjs/error-handling

fix(RequestClient): add catch block to authorize method
This commit is contained in:
Yury Shkoda
2021-02-25 12:59:47 +03:00
committed by GitHub

View File

@@ -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) => {