Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return 503 for not yet available feeds instead of 404 #431

Closed
hbruch opened this issue Apr 20, 2024 · 1 comment · Fixed by #432
Closed

Return 503 for not yet available feeds instead of 404 #431

hbruch opened this issue Apr 20, 2024 · 1 comment · Fixed by #432
Labels
enhancement New feature or request

Comments

@hbruch
Copy link
Collaborator

hbruch commented Apr 20, 2024

Is your feature request related to a problem? Please describe.
We have a few feed providers whose upstream gbfs feeds are temporarilly unavailable and hence can't be subscribed to by lamassu. Currently for these unitialized feeds lamassu responds with a 404 Not Found reply.

Goal / high level use-case
Lamassu users may retrieve the gbfs endpoint and try to request all configured feeds. For feeds which currently are not available, they receive a 404 error, blaming themselves for wrongly requesting feeds that lamassu announces to exist.

Describe the solution you'd like
We suggest to respond with e.g. 503 SERVICE UNAVAILABLE for feeds which are not yet available (i.e. a feedprovider for system_id is registered).

Describe alternatives you've considered
Another option would be to not publish them in the gbfs endpoint as long as they are not available, but this would not adddress the unavailable issue if the gbfs response was cached or the client relies on the existance of the feed.

@hbruch hbruch added the enhancement New feature or request label Apr 20, 2024
@testower
Copy link
Collaborator

Sounds reasonable. This means that the gbfs resource handler needs to check cache misses against the discovery file to determine whether it's a real 404 or a 503.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants