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

fix: Use consistent error type between doc, logger and error class #5046

Merged
merged 5 commits into from Aug 22, 2022

Conversation

sato11
Copy link
Contributor

@sato11 sato11 commented Jul 29, 2022

☕️ Reasoning

Following up this comment: #5027 (comment).

I've abstained from further renaming it like CALLBACK_ERROR, since my original intention is only to make them consistent. I'm feeling happy enough with OAUTH_CALLBACK_ERROR, partly because I am not really sure over the intention of renaming. So I'd like to leave that to you.

About the doc, two changes have been made: merging CALLBACK_OAUTH_ERROR and oauth_callback_error, and relocating openid-client stuff to SIGNIN_OAUTH_ERROR section. Background of the latter change is reasoned in #5045.

Commits are separately made, but if you want me to squash them let me know.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Closes: #5045

📌 Resources

The same errors have been logged, firstly before throwing
OAuthCallbackError, later in the catch-clause of it.

This commit removes the former and lets the latter survive,
because logging functionality seems better to reside in the
same neighborhood.
@vercel
Copy link

vercel bot commented Jul 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
next-auth ✅ Ready (Inspect) Visit Preview Aug 21, 2022 at 8:00AM (UTC)

@github-actions github-actions bot added the core Refers to `@auth/core` label Jul 29, 2022
@vercel vercel bot temporarily deployed to Preview July 29, 2022 11:50 Inactive
Co-authored-by: Thang Vu <thvu@hey.com>
@sato11
Copy link
Contributor Author

sato11 commented Aug 2, 2022

@ThangHuuVu Thanks for the feedback. How does it look to you now?

Copy link
Member

@ThangHuuVu ThangHuuVu left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ThangHuuVu
Copy link
Member

@ndom91 @lluia I was wondering if changing the error code requires a bump in semver 🤔 WDYT?

@ThangHuuVu ThangHuuVu changed the title Use consistent error type between doc, logger and error class chore: Use consistent error type between doc, logger and error class Aug 21, 2022
@vercel vercel bot temporarily deployed to Preview August 21, 2022 08:00 Inactive
@ThangHuuVu ThangHuuVu changed the title chore: Use consistent error type between doc, logger and error class fix: Use consistent error type between doc, logger and error class Aug 22, 2022
@ThangHuuVu ThangHuuVu merged commit 3131971 into nextauthjs:main Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use consistent error type between doc, logger and error class
2 participants