nango
nango copied to clipboard
pizzly-js: Trying to make request with unauthorized authId should cause Promise to reject
Currently if the response is 404
{
"error": {
"type": "unknown_authentication",
"message": "That authentication (auth_id) could not be found with the provided integration."
}
}
..the response does not get interpreted as an error.
Actually.. seeing as fetch only rejects if there is a network error it's not totally clear what the best thing is to do here. It does feel like if there's an issue on the Pizzly side of things it should be distinguished from a payload returned by the destination server..