Skip to content
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

Add response to response errors #391

Merged
merged 6 commits into from
Sep 10, 2023

Conversation

koddsson
Copy link
Collaborator

@koddsson koddsson commented Sep 8, 2023

Hey there!

(I couldn't find any notes on contributing so I assumed that PRs are welcome but if not, no worries)

I want to filter response errors throw in es-module-shims based off some criteria of their response. I find parsing the error message a bit brittle but I could get the information from there. Before doing that I wanted to suggest sub-classing the Error class with a ResponseError which includes the actual response and then throwing that error when a response error occurs.

What do you think? I added a single test but I can add some more to increase confidence.

Copy link
Owner

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you, see the one comment.

src/es-module-shims.js Outdated Show resolved Hide resolved
@guybedford guybedford merged commit ce5b6eb into guybedford:main Sep 10, 2023
7 checks passed
@koddsson koddsson deleted the add-response-to-response-errors branch September 11, 2023 05:59
@koddsson
Copy link
Collaborator Author

Hey @guybedford; is there a cadence to releases? I couldn't find anything in the README and I'm happy to just build it myself if required but thought I'd ask before doing that :)

@guybedford
Copy link
Owner

@koddsson thanks for the ping, 1.8.1 is now released.

@guybedford
Copy link
Owner

(also if anyone would like to volunteer as a co-maintainer, that is always welcome!!)

@koddsson
Copy link
Collaborator Author

(also if anyone would like to volunteer as a co-maintainer, that is always welcome!!)

Happy to help with anything <3

Something like reviewing, merging and releasing pull requests and managing issues?

@guybedford
Copy link
Owner

@koddsson I've added you to the repo, help with issue triage and PR review would be great, then ping me if you ever would like to do a release. Of course there are no obligations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants