-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Api retrying #1736
Api retrying #1736
Conversation
let newHeaders: Record<string, string> | null = null; | ||
let retry = 0; | ||
|
||
while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while
loops always make me uneasy... can this one also be a for
like in apiThunk
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Changed to 'for' now. A tad more awkward to get typescript to respect the return type but I agree overall this is better now.
request_pre: null, | ||
request_post: null, | ||
request_refresh_jwt: null, | ||
bear: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bear
is unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there before I got here ¯_(ツ)_/¯ and yes it is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must be going blind 🙈
Co-authored-by: Alex Johnson <johnson.alex.c@gmail.com>
@alexcjohnson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 Beautiful. Lovely test! Will merge once ✅
This PR makes dash-renderer refresh the
Authorization
header with a new JWT provided by therequest_refresh_jwt
hook, upon a server response indicating that the JWT is expired (401 status, and "JWT Expired" in body).Contributor Checklist
optionals
CHANGELOG.md