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

Unhandled exception #29

Merged
merged 2 commits into from
Jan 22, 2022
Merged

Conversation

ryuuzake
Copy link
Contributor

PR for #28

  1. Add original DioError to DirectusError
  2. Handle error from manuallyRefresh in refreshExpiredTokenInterceptor

@ryuuzake
Copy link
Contributor Author

I still don't know how to test the dio interceptor handling the reject sent from refreshExpiredTokenInterceptor

Do you have any idea?

@apstanisic
Copy link
Owner

Probably by making some other request while access token is expired.
That way sdk should try to update token first, and we mock an error in manuallyRefresh. That way request should throw an error. I'll try to figure out the way soon

@apstanisic
Copy link
Owner

Thanks for the PR. I've open another issue for test #30

@ryuuzake ryuuzake deleted the unhandled-exception branch January 22, 2022 17:04
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.

None yet

2 participants