Skip to content
Discussion options

You must be logged in to vote

$.getJSON is not returning a resolved or rejected promise. It returns an object that kinda looks like a promise? It's certainly not an error.

So when we throw it, react thinks it's a promise and picks it up. You probably need to wrap this thing in a real promise, and resolve it in the onSuccess callback, and look at the status and reject it accordingly.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dtinth
Comment options

@TkDodo
Comment options

@dtinth
Comment options

@TkDodo
Comment options

@dtinth
Comment options

Answer selected by dtinth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4438 on November 03, 2022 16:19.