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

Invalid query parameters return two different error shapes

Aperta
#1,112 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api

Direzione di ricerca

Start by tracing query-parameter validation on the list endpoints for limit, dir, order_by, time[…], and the next/prev cursors, comparing the 400 and 422 response shapes shown in the issue. The issue leaves the choice of status and shape open, so clarify that decision before changing behavior. Done means all those invalid parameters use one consistent status and response shape, with a release note covering the client compatibility impact.

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

Descrizione

As of #1109, on the list endpoints an invalid limit returns a 400 with a plain message. For example GET /api/v1/events?limit=0:

{"status":400,"message":"invalid limit: must be between 1 and 1000"}

An invalid dir, order_by or time[…] on the same endpoint returns a 422 with a data detail. For example GET /api/v1/events?dir=sideways:

{"status":422,"message":"validation error","data":{"query.dir":"must be 'asc' or 'desc'"}}

An invalid next or prev cursor is a 400 with a plain message, like limit. A client has to handle both shapes for one request.

Proposal: pick one status and shape for query parameter validation and apply it on every endpoint. Clients that match on the status would break, so the change needs a release note.

Lingua principale
Go
Stelle
1.1k
Fork
70
Merge medio
1g 3h
PR unite (30g)
50

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 hookdeck/outpost

Tutte le issue di hookdeck/outpost

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.