Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Have HTTP 4xx instead of 5xx on SQL syntax error

Aperta
#10,615 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, python
Ambito
api, database

Direzione di ricerca

The payload names no source files, so start by reproducing: run a query with a SQL syntax error in the pgAdmin Query Tool and note the HTTP status returned (500) and the JSON body. Then find where the server converts PostgreSQL errors into HTTP responses, and check how the linked upstream issue #9872 handled similar errors. Done means a syntax error returns a 4xx status such as 400 with the same JSON body, and other server errors keep their current status.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature

Describe the solution you'd like

Hi,

I create this ticket to follow https://github.com/pgadmin-org/pgadmin4/issues/9872, I'm in case of a corporate IT infra where proxy security cannot be changed and this last replace JSON body response for request whose response code is HTTP 5xx by a proxy specific response.
The security reason is to avoid potentiel technical leak from backend.
In addition in a Rest API design, it is not semantically correct to have a HTTP 500 when pgadmin user enter an incorrect SQL request, a HTTP 400 Bad Request should be more appropriate.

Describe alternatives you've considered

The alternative should be to have pgadmin server answer HTTP 400 Bad Request code and pgadmin webapp interpret JSON as before.

Lingua principale
Python
Stelle
3.9k
Fork
908
Merge medio
1g 6h
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pgadmin-org/pgadmin4

Tutte le issue di pgadmin-org/pgadmin4

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.