1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-24 14:31:19 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Yury Shkoda
0a4dd00edb Merge pull request #266 from sasjs/error-handling
fix(RequestClient): add catch block to authorize method
2021-02-25 12:59:47 +03:00
Yury Shkoda
55b4929c54 Merge branch 'master' into error-handling 2021-02-25 12:58:25 +03:00
Yury Shkoda
8eb73a6b3c fix(RequestClient): add catch block to authorize method 2021-02-25 12:55:34 +03:00

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