SupabaseConnector upload queue error code fix #223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems that the example SupabaseConnector files have morphoed a bit over time and that a bug slipped through to a few of them which caused table operations with errors never being removed from the upload queue.
This PR ensures that the thrown error contains the postgres error code (which was left out when making a new
Error
) which is then evaluated. Verified that bad operations (like RLS violations) are removed from the upload queue.To easily reproduce insert a list/todo with a random owner UUID not related to the logged in user.
Side note:
Is there merit in having an importable SupabaseConnector or flag that can be enabled on a PS instance that uses a bundled SB connector? Or is having these explicit copies of the Connector good for illustration?