postgrestRequest returns PostgREST error responses as successful results
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Trova l’implementazione di postgrestRequest nel pacchetto mcp-server-postgrest e leggi come gestisce la risposta HTTP e costruisce il risultato dello strumento. Controlla i test esistenti per quella richiesta oppure aggiungi una copertura per uno stato di errore se nell’issue non ne viene menzionato nessuno. Il lavoro è completato quando le risposte non riuscite restituiscono isError: true e includono il codice di stato e il corpo della risposta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When PostgREST answers a postgrestRequest call with an error status, the tool returns the error body as a normal result and isError is not set. A request for a table that does not exist, or with a malformed filter, looks like a successful call.
To Reproduce
-
Run
mcp-server-postgrestagainst a Supabase project's REST API:mcp-server-postgrest --apiUrl https://<project-ref>.supabase.co/rest/v1 --apiKey <publishable key> --schema public -
Call
postgrestRequestwith{ "method": "GET", "path": "/no_such_table?select=*" }. -
The call returns
isError: falseand:{"result":{"code":"PGRST205","details":null,"hint":null,"message":"Could not find the table 'public.no_such_table' in the schema cache"}} -
Call it with
{ "method": "GET", "path": "/no_such_table?select=*&bad=" }. This also returnsisError: false:{"result":{"code":"PGRST100","details":"unexpected end of input expecting \"not\" or operator (eq, gt, ...)","hint":null,"message":"\"failed to parse filter ()\" (line 1, column 1)"}} -
Start the server with an invalid
--apiKeyand call it with{ "method": "GET", "path": "/" }. This also returnsisError: false:{"result":{"message":"Invalid API key","hint":"Double check your Supabase `anon` or `service_role` API key."}}
Expected behavior
A response with an error status is returned as an error (isError: true) that includes the status code and the response body, so the caller can tell the request failed.
System information
- OS: Ubuntu (WSL2)
- Browser: N/A
- Version of @supabase/mcp-server-postgrest: 0.2.0
- Version of Node.js: 24.15.0
- Lingua principale
- TypeScript
- Stelle
- 3k
- Fork
- 432
- Merge medio
- 1g 7h
- PR unite (30g)
- 52
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di supabase/mcp
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Let execute_sql run as a project role you chooseForse già presa @barryroodt l’ha presa 5 giorni fa. Aperta
supabase/mcp#537 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
execute_sql runs MERGE ... WHEN MATCHED THEN DELETE without the destructive confirmationForse già presa @barryroodt l’ha presa 5 giorni fa. ApertaMCP
Difficoltà 3/5 1-2 giorni Idoneità per principianti 69/100
supabase/mcp#532 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
list_tables: schemas says it defaults to all schemas but defaults to ["public"], so the RLS advisory silently reports on a partial databaseForse già presa @PranshulSoni l’ha presa 75 giorni fa. Apertabug MCP
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
supabase/mcp#395 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Feature MCP
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
supabase/mcp#361 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di supabase/mcp
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
Koenkk/zigbee-herdsman-converters#13820 ·
I maintainer di solito rispondono entro 2 giorni
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Wallet functions throws TypeError when the wallet has no account IDForse già presa @Medhansh-741 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
hiero-ledger/hiero-sdk-js#4781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno