Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

fix: add custom error classes - #341

Merged
kangmingtay merged 3 commits into
km/cleanup-session-typefrom
km/add-custom-errors
Aug 3, 2022
Merged

fix: add custom error classes#341
kangmingtay merged 3 commits into
km/cleanup-session-typefrom
km/add-custom-errors

Conversation

@kangmingtay

Copy link
Copy Markdown
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 alaister and inian August 3, 2022 06:56
@kangmingtay kangmingtay self-assigned this Aug 3, 2022
Comment thread src/lib/cookies.ts

@silentworks silentworks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread src/GoTrueClient.ts Outdated
Comment thread src/GoTrueApi.ts
const { event, session } = req.body

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

Copy link
Copy Markdown
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

github-actions Bot commented Aug 4, 2022

Copy link
Copy Markdown
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants