nango icon indicating copy to clipboard operation
nango copied to clipboard

pizzly-js: Trying to make request with unauthorized authId should cause Promise to reject

Open johtso opened this issue 2 years ago • 1 comments

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.

johtso avatar Apr 20 '22 15:04 johtso

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..

johtso avatar Apr 21 '22 22:04 johtso