fusionauth-typescript-client icon indicating copy to clipboard operation
fusionauth-typescript-client copied to clipboard

Recent change broke browser support.

Open tjpeden opened this issue 6 years ago • 3 comments

@tyduptyler13 @robotdan the change introduced by this commit isn't working for me in the browser. There's never a response.body, even for a normal 200 response (with a body). I also don't see that property on the response object with console.dir. I checked in both FF DE 72 and Chromium 79. I assume this is working for @tyduptyler13 because it was tested in Node.JS and the node-fetch implementation already includes the body property, but browser support isn't there.

My understanding of the it was written before my chance and the way I wrote my change is that if there was no body, it would (as @tyduptyler13 said) throw an error, which would be caught and stored in clientResponse.exception which if clientResponse.wasSuccessful() returns true, could safely be ignored.

tjpeden avatar Jan 05 '20 04:01 tjpeden

Thanks for letting us know @tjpeden - we'll take a look.

robotdan avatar Jan 06 '20 15:01 robotdan

@tyduptyler13 was unable to recreate, but we've re-worked some of the error handling and added some additional type information.

See if you can still recreate at 1.13.2 https://www.npmjs.com/package/@fusionauth/typescript-client

robotdan avatar Jan 18 '20 01:01 robotdan

@tjpeden Have you been able to reproduce with client versions >= 1.13.2 ?

matthew-altman avatar Feb 26 '20 17:02 matthew-altman