Add request details to the error message if request related to tokens operations failed.
Implementation
Created src/auth/getTokenRequestErrorPrefix.ts utility and used it in src/auth/getAccessTokenForSasjs.ts, src/auth/getAccessTokenForViya.ts, src/auth/refreshTokensForSasjs.ts and src/auth/refreshTokensForViya.ts functions.
Covered getTokenRequestErrorPrefix.ts with unit tests.
Updated unit tests related to tokes operations.
Updated function docs.
Checks
No PR (that involves a non-trivial code change) should be merged, unless all items below are confirmed! If an urgent fix is needed - use a tar file.
[x] All sasjs-cli unit tests are passing (npm test).
(CI Runs this) All sasjs-tests are passing. If you want to run it manually (instructions available here).
[ ] Data Controller builds and is functional on both SAS 9 and Viya
Issue
Closes #811
Intent
Implementation
src/auth/getTokenRequestErrorPrefix.ts
utility and used it insrc/auth/getAccessTokenForSasjs.ts
,src/auth/getAccessTokenForViya.ts
,src/auth/refreshTokensForSasjs.ts
andsrc/auth/refreshTokensForViya.ts
functions.getTokenRequestErrorPrefix.ts
with unit tests.Checks
No PR (that involves a non-trivial code change) should be merged, unless all items below are confirmed! If an urgent fix is needed - use a tar file.
sasjs-cli
unit tests are passing (npm test
).sasjs-tests
are passing. If you want to run it manually (instructions available here).