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: add custom error classes #341

Merged
merged 3 commits into from
Aug 3, 2022

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • Use a custom error class that extends AuthError instead of throwing a generic error

@kangmingtay kangmingtay requested review from inian and alaister August 3, 2022 06:56
@kangmingtay kangmingtay self-assigned this Aug 3, 2022
Copy link
Contributor

@silentworks silentworks left a comment

Choose a reason for hiding this comment

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

LGTM

src/GoTrueClient.ts Outdated Show resolved Hide resolved
@@ -697,9 +697,9 @@ export default class GoTrueApi {
}
const { event, session } = req.body

if (!event) throw new Error('Auth event missing!')
if (!event) throw new AuthEventMissingError()
Copy link
Contributor

Choose a reason for hiding this comment

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

More a question than a review comment: when will we have auth events go missing? Not too sure how the events portion works.

If there's time, can I trouble you for a short overview pre/post sync?

@kangmingtay kangmingtay merged commit 8391c31 into km/cleanup-session-type Aug 3, 2022
@kangmingtay kangmingtay deleted the km/add-custom-errors branch August 3, 2022 10:32
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

🎉 This PR is included in version 1.23.0-next.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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