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

Hook up onError function for rpc server and next #3460

Merged
merged 4 commits into from
Jun 29, 2022
Merged

Conversation

Zeko369
Copy link
Collaborator

@Zeko369 Zeko369 commented Jun 23, 2022

Closes: #3422, #3200

What are the changes and their implications?

  • Adds onError for next server init
  • Hooks up onError from rpcHandler

@changeset-bot
Copy link

changeset-bot bot commented Jun 23, 2022

🦋 Changeset detected

Latest commit: a15c99a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@blitzjs/next Patch
@blitzjs/rpc Patch
@blitzjs/auth Patch
@blitzjs/codemod Patch
@blitzjs/config Patch
@blitzjs/generator Patch
blitz Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

beerose
beerose previously approved these changes Jun 24, 2022
Copy link
Contributor

@beerose beerose left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you a lot for adding this!

@beerose beerose dismissed their stale review June 24, 2022 11:41

Had one comment

@beerose
Copy link
Contributor

beerose commented Jun 24, 2022

I also started wondering if we don't want to have it on the RPC plugin settings instead — e.g. someone may not use RPC at all, and then it's not clear what onError setting refers to. What do you think?

@Zeko369
Copy link
Collaborator Author

Zeko369 commented Jun 25, 2022

Hmm but we have 2 onErrors, one for BlitzServer and one for RPCHandler?

The only thing actually missing is that BlitzServer one is only used in API routes not in SSR/SSG and that might me useful?

@Zeko369
Copy link
Collaborator Author

Zeko369 commented Jun 26, 2022

Update on the last comment, I added error handling into GSSP / GSP / API functions

@beerose
Copy link
Contributor

beerose commented Jun 29, 2022

Ok, after further thought, I think it's good. Thanks again for working on that — it's super helpful !!

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

Successfully merging this pull request may close these issues.

3 participants