fix(query-actions): reject with the actual error, not undefined - #325
fix(query-actions): reject with the actual error, not undefined#325gcutrini wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
_fetch caught a failed getAccessToken and returned Promise.reject() with no error, so callers received undefined. Reject with the actual error so a caller can tell why the request failed.
838de3b to
4dc0425
Compare
|
Superseded by #324: _fetch now reports a token failure only through the callback (return, no rejection), since the query* functions never await that promise and a rejection only surfaced as an unhandled rejection. Covered by the token-failure test there. |
_fetch caught a failed getAccessToken and returned Promise.reject() with no error, so callers received undefined. Reject with the actual error so a caller can tell why the request failed.