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

chore: update supabase and handle null entry in connector #77

Merged
merged 5 commits into from
Nov 4, 2024

Conversation

DominicGBauer
Copy link
Contributor

@DominicGBauer DominicGBauer commented Oct 31, 2024

Description

This updates to supabase-kt 3 (migration guide here) which requires updating to ktor 3 (migration guide here). There were only some minor changes required in the end.

This also includes handling postgres errors that are fatal and block the upload queue in the connectors uploadData function (more info on the issue here. This requires using an http interceptor to get the error code used in the regex check for fatal errors as the supabase-kt does not include it in it's error response https://github.com/supabase-community/supabase-kt/blob/68b9f7d61eb174a02bdc2cb01cb4c40eb8e8d1d9/Supabase/src/commonMain/kotlin/io/github/jan/supabase/exceptions/RestException.kt#L18.

I have created a feature request in supabase-kt for them to expose the response so that we do not need to use the HTTP interceptor in the future. supabase-community/supabase-kt#774

supabase was removed from supabase-todolist demo's ``gradle.build` as Supabase is installed in the root and not required in the demo.

Testing

I have run the supabase todolist app and added, updated and removed todos from both the mobile app and supabase and confirmed they are processed.

Showing an example when adding null if non-null constraint is applied in Supabase.

Update.Supabase.Connector.mov

@DominicGBauer DominicGBauer merged commit 371e6a0 into main Nov 4, 2024
3 checks passed
@DominicGBauer DominicGBauer deleted the chore/update-supabase branch November 4, 2024 14:02
@DominicGBauer DominicGBauer mentioned this pull request Dec 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants