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

Capture error from supabase query #82

Open
DangMin opened this issue Apr 28, 2022 · 0 comments
Open

Capture error from supabase query #82

DangMin opened this issue Apr 28, 2022 · 0 comments

Comments

@DangMin
Copy link
Collaborator

DangMin commented Apr 28, 2022

Descriptions

After we added different conditions to supabase, we need to capture the custom error with the format

{ message: [error_code], hint: [string] }

error_code will be a key string for translation, while hint will be its English format

Error list

Error Message (errcode) Hint
limit user to 24 flashcard sets MAX_ALLOWED_SETS_CREATED User has exceeded the amount of flashcard sets allowed (24).
only creators of flashcard_sets can add/edit flashcards UNAUTHORIZED_MODIFY_FLASHCARDS User not allow to modify flashcard in the other flashcard_set.

Screenshot

example-error
.

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

No branches or pull requests

1 participant