🤔 Why "put" behaves so much differently than "get" and "post"

Hello everyone,

today there is another new challenge. I’ve had a lot of experience with “get” and “post” within ComposerPro, and I didn’t realize that “put” behaves so much differently than “get” and “post”.

What is the error message trying to tell me?

Error: JSON error response from server: {"message":"Payload values do not match URL in primary key column(s)"}.status: 400


Resource settings for Update record (PUT)
-------------------
Resource URL: https://some_url.supabase.co/rest/v1
Relative path: /users?usr_id=eq.{usr_id}

I get the same error message when I recreate the put request in Postman.

The dark one you see below is from the Supabase documentation.

I have coded the relevant information.

I am looking forward to your feedback

Hey,

I’m not that familiar with Supabase, but at least the Prefer header value seems to be off. I’m guessing it should be return=representation instead of Prefer:return=representation

Oh thank you that was definitely a good step in the right direction.
That was definitely wrong before.
But the problem still persists.

Do you have any other ideas?

thank you very much

Hi everyone I found out.

I have many columns in table “users” in Supabase. A few are/were not nullable.

Supabase:

Allow Nullable
Allow the column to assume a NULL value if no value is provided

From within AppGyver, however, I only wanted to update three values ​​instead of every value in the row.
For whatever reason, the columns that were not nullable caused the error even though they were not affected by the update.

Now all columns are nullable and it works fine.
Strange :flushed:

1 Like