-
Notifications
You must be signed in to change notification settings - Fork 493
Open
Labels
bugSomething isn't workingSomething isn't workingrealtime-jsRelated to the realtime-js library.Related to the realtime-js library.
Description
Bug report
- [X ] I confirm this is a bug with Supabase, not with my own application.
- [X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
supabase-js is logging JSON parse error: SyntaxError: JSON Parse error: Unexpected character: d
with no stack and no further detail after successfully upserting a row to the database.
To Reproduce
const { count, data, error } = await db
.from(table_name)
.upsert(snapshot as any, { ignoreDuplicates: false, onConflict: "id" })
.eq("id", id)
.select()
.single()
With the above upsert error
is null
but somewhere internal to supabase-js logs JSON parse error: SyntaxError: JSON Parse error: Unexpected character: d
. If I comment out this upsert operation the spurious error log goes away.
Expected behavior
If there is an error supabase-js should return or throw it
Screenshots
N/A
System information
- OS: macOS
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: 2.39.3
- Version of Node.js: N/A
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingrealtime-jsRelated to the realtime-js library.Related to the realtime-js library.