Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporated new sdk-standard-components functionality into SDK #224

Merged

Conversation

partiallyordered
Copy link
Contributor

@partiallyordered partiallyordered commented Nov 4, 2020

Two changes:

  1. When a request fails with a 401, the new environment variable WSO2_AUTH_FAILURE_REQUEST_RETRIES will now allow the SDK to attempt to retrieve a new token, then retry the request, if WSO2 auth is enabled.
  2. When WSO2 token retrieval fails, instead of failing silently, which has happened since the change of base request library from request-promise to @mojaloop/sdk-standard-components/src/lib/request.js, an error will now propagate to the top level (and crash the SDK)

Copy link
Contributor

@bushjames bushjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest this is a major version bump as it looks like default behaviour on auth failure has changed?

@bushjames bushjames self-requested a review November 5, 2020 11:26
Copy link
Contributor

@bushjames bushjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy that this does not change default behaviour on auth failure.

@partiallyordered
Copy link
Contributor Author

I am happy that this does not change default behaviour on auth failure.

Regarding this, James clarified with me on Slack:

  1. the new environment variable is not mandatory
  2. the default value of the new environment variable, when omitted, results in the same behaviour as before this change
  3. there are no backward-incompatible API changes

@partiallyordered partiallyordered merged commit 326ccd9 into master Nov 5, 2020
@partiallyordered partiallyordered deleted the incorporate-new-sdk-standard-components-functionality branch November 5, 2020 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants