-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileLoader: Add response to error object. #24296
Conversation
Should I include my company in the description? They are paying me lol |
Do you mind rebasing your PR? The PR diff shows many unrelated changes.
Do whatever you think it's best. The section |
Yeah I can do that. Those changes came from the linter. I'll remove them. |
Thanks! |
* Surface fetch Response object in Error when non 200 HTTP status is received * Remove HttpError from export
* Surface fetch Response object in Error when non 200 HTTP status is received * Remove HttpError from export
Fixed #24295
Description
If a non-200 HTTP status is received in the FileLoader, I would like to have a safer way to check that then checking the error message text.
I added a custom HttpError type that adds an extra property to include the fetch Response object in the Error object. This seems like the best way to let devs do as they wish when this happens.
This is backwards compatible, and I tested by linking my local branch of three to my project
Also I ran lint-fix on everything hence the changes in the extra files.