Closed
Description
Bug report
Describe the bug
I am trying to upsert data. The first time I run it, it works fine, and it inserts the reocrd into the table. But any subsequent times it returns back either a 400 or 409 error.
To Reproduce
struct Basic: Encodable {
var id: Int
}
func upsertData() async throws {
do {
let item = Basic(id: 4)
try await client.database
.from("test")
.upsert(values: item)
.execute()
} catch {
print("Error executing the query: \(error)")
}
}
Expected behavior
It should allow the upsert to happen. This is the most basic version of it with just one column, but it also fails on my normal table.
System information
- OS: macOS
- Version of supabase-swift: 0.3.0