Provider response outside of operating hours

Aperta
#746 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
api

Direzione di ricerca

Inizia dal contratto degli endpoint /status_changes e /trips del provider descritto nell’issue. Esamina come questi endpoint distinguono attualmente le ore al di fuori dell’orario operativo dagli altri casi di 404, quindi determina e documenta una convenzione di risposta che provider e consumer possano riconoscere in modo coerente. Il lavoro è completato quando il comportamento selezionato e il suo impatto sulla compatibilità sono specificati chiaramente.

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

Descrizione

Provider

Right now, the following is true for the provider /status_changes and /trips endpoints:

For hours in which the provider was not operating the API shall return a 404 Not Found response

However, as a consumer of these endpoints, I've found in practice that it's common for 404 responses to be returned in other situations aside from this one. The most common situation is when data is being requested for a city which doesn't exist or has been removed from the feed, but it also sometimes happens that a bug in the system produces a stray 404 as well.

We want to be able to adjust our ingestion logic when we get these 404 errors, but we can't safely guarantee that we actually are getting the error we think we're getting, which leaves us with the undesirable process of hard-coding checks for each provider's specific and unspecified error messages.

My proposed solution is to define a specific error message string which must also be returned in addition to the 404, something like HOUR NOT IN SERVICE, so that it is completely clear that this is the specific reason that the 404 has been returned.

This would only be a breaking change for providers.

Alternatively the error code could be changed to a less common value (ie, 410, which some operators are already returning under older versions of MDS before this error code was defined). This would be a breaking change for both providers and consumers, so I imagine it is less preferable.

Lingua principale
Nessun dato sulla lingua
Stelle
753
Fork
255
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 openmobilityfoundation/mobility-data-specification

Tutte le issue di openmobilityfoundation/mobility-data-specification

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.