Failed post request not recorded in logs

My app is sending a request to add an item, the request fails but the response makes no sense and I see no logs in the gateway or in the backend of Supabase.
curl 'https://myproject.supabase.co/rest/v1/items?columns=%22name%22%2C%22description%22%2C%22container_id%22%2C%22location%22%2C%22human_friendly_location%22%2C%22ai_description%22%2C%22ai_entities%22%2C%22owner_id%22%2C%22is_shared%22&select=*' \
-H 'accept: application/vnd.pgrst.object+json' \
-H 'accept-language: en-GB,en;q=0.9,it-IT;q=0.8,it;q=0.7,fr;q=0.6' \
-H 'apikey: DONTREADME' \
-H 'authorization: Bearer CHEEky' \
-H 'cache-control: no-cache' \
-H 'content-profile: public' \
-H 'content-type: application/json' \
-H 'origin: https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3--5173--b980e309.local-credentialless.webcontainer-api.io' \
-H 'pragma: no-cache' \
-H 'prefer: return=representation' \
-H 'priority: u=1, i' \
-H 'referer: https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3--5173--b980e309.local-credentialless.webcontainer-api.io/' \
-H 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?1' \
-H 'sec-ch-ua-platform: "Android"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36' \
-H 'x-client-info: supabase-js-web/2.50.0' \
--data-raw '[{"name":"Draft Item","location":{"type":"Point","coordinates":[0,0]},"human_friendly_location":"Location not detected","ai_description":"Draft Item stored in Draft item","ai_entities":[],"owner_id":"eed8715f-466c-4441-bf04-d3e78831efc3","is_shared":false}]'
curl 'https://myproject.supabase.co/rest/v1/items?columns=%22name%22%2C%22description%22%2C%22container_id%22%2C%22location%22%2C%22human_friendly_location%22%2C%22ai_description%22%2C%22ai_entities%22%2C%22owner_id%22%2C%22is_shared%22&select=*' \
-H 'accept: application/vnd.pgrst.object+json' \
-H 'accept-language: en-GB,en;q=0.9,it-IT;q=0.8,it;q=0.7,fr;q=0.6' \
-H 'apikey: DONTREADME' \
-H 'authorization: Bearer CHEEky' \
-H 'cache-control: no-cache' \
-H 'content-profile: public' \
-H 'content-type: application/json' \
-H 'origin: https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3--5173--b980e309.local-credentialless.webcontainer-api.io' \
-H 'pragma: no-cache' \
-H 'prefer: return=representation' \
-H 'priority: u=1, i' \
-H 'referer: https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3--5173--b980e309.local-credentialless.webcontainer-api.io/' \
-H 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?1' \
-H 'sec-ch-ua-platform: "Android"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36' \
-H 'x-client-info: supabase-js-web/2.50.0' \
--data-raw '[{"name":"Draft Item","location":{"type":"Point","coordinates":[0,0]},"human_friendly_location":"Location not detected","ai_description":"Draft Item stored in Draft item","ai_entities":[],"owner_id":"eed8715f-466c-4441-bf04-d3e78831efc3","is_shared":false}]'
Isnt this supposed to be logged under the API Gateway or PostgRest?
8 Replies
garyaustin
garyaustin3mo ago
If your apikey and url are correct then it will show in the api gateway log with or without error. Not really sure the PostgREST logs do anything.
bizmate
bizmateOP3mo ago
unfortunately it is no there. they key and url are definitely correct else i wont even get the error back i dont see any post requests on the gateway logs never mind maybe got it is the response supposed to be visible there? not sure what to troubleshoot in this response
"response": [
{
"headers": [
{
"cf_cache_status": "DYNAMIC",
"cf_ray": "9555f21ad65c3876-MRU",
"content_length": null,
"content_location": null,
"content_range": null,
"content_type": "application/json; charset=utf-8",
"date": "Wed, 25 Jun 2025 16:47:15 GMT",
"sb_gateway_mode": null,
"sb_gateway_version": "1",
"transfer_encoding": "chunked",
"x_kong_proxy_latency": null,
"x_kong_upstream_latency": null,
"x_sb_error_code": null
}
],
"origin_time": 322,
"status_code": 400
}
]
"response": [
{
"headers": [
{
"cf_cache_status": "DYNAMIC",
"cf_ray": "9555f21ad65c3876-MRU",
"content_length": null,
"content_location": null,
"content_range": null,
"content_type": "application/json; charset=utf-8",
"date": "Wed, 25 Jun 2025 16:47:15 GMT",
"sb_gateway_mode": null,
"sb_gateway_version": "1",
"transfer_encoding": "chunked",
"x_kong_proxy_latency": null,
"x_kong_upstream_latency": null,
"x_sb_error_code": null
}
],
"origin_time": 322,
"status_code": 400
}
]
interesting that supabase uses kong, but in this response i see no error, how do i troubleshoot it
garyaustin
garyaustin3mo ago
Any response with posgrest error in the return body? Does items table exist? Is RLS enabled?
bizmate
bizmateOP3mo ago
yes it was working, there is something it does not like in the way the post is done now but i cant see what given that all fields required are being posted and the error returned but not logged is not related to the items table but to something else ...
{code: 'PGRST204', details: null, hint: null, message: "Could not find the 'is_shared' column of 'items' in the schema cache"}
{code: 'PGRST204', details: null, hint: null, message: "Could not find the 'is_shared' column of 'items' in the schema cache"}
the weird thing is that i dont see is that in the chrome network log i dont see the response. This comes from somewhere in the console log in the app this is_shared is not part of items table
garyaustin
garyaustin3mo ago
I see is_shared in your CURL call. Really not sure the curl call is proper format. What is the columns= part. I don’t use the Rest client with http calls and they are hard to decipher.
bizmate
bizmateOP3mo ago
electricity went down ... i ll try to reproduce again i think i see the problem but not sure exactly why supabase complaints, it could well ignore it the new request sends this is_shared value but this does not exist in the columns
garyaustin
garyaustin3mo ago
You are asking for a column that does not exist. Postgres the db does not allow that.
bizmate
bizmateOP3mo ago
yes, i m not sure what introduced that it is fixed, but now it is not accepting coordinates 😦 it used to work before

Did you find this page helpful?