Allow configurable accepted HTTP status codes for webhook protocol

Aperta
#193 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
api

Direzione di ricerca

Inizia individuando la gestione delle risposte di consegna del webhook e le relative definizioni di configurazione nel repository Go. Traccia il punto in cui HTTP 200 viene attualmente trattato come successo, quindi aggiungi la copertura per il comportamento predefinito e per una risposta 202 consentita; il lavoro è completato quando i codici di stato accettati sono configurabili, mantenendo al contempo i valori predefiniti limitati a 200.

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

Descrizione

enhancement

The webhook protocol currently treats only HTTP 200 (http.StatusOK) as a successful response. Any other status code (including other 2xx codes such as 202) is treated as an error.

Please add support for an allowlist of accepted status codes (e.g. 200, 202) so webhook integrations can treat other 2xx codes as success.

Some webhook endpoints legitimately respond with status codes other than 200 (for example 202 Accepted when the payload is queued for async processing). Today these are handled as failures even though the request succeeded from the sender’s perspective.

For instance, this would be helpful a Zipkin-related input package being added in elastic/integrations:

And zipkin receiver returns a 202 code when sending JSONs to its endpoint (related code).

Could it be added a new configuration option to define which HTTP status codes should be considered successful for webhook delivery (as allowed list)? The default value for this allowed list should be 200 to keep the same behavior as it is now.

Lingua principale
Go
Stelle
12
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 elastic/stream

Tutte le issue di elastic/stream

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.