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
Respond with status code 502 if configured feed not yet available #432
Respond with status code 502 if configured feed not yet available #432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if system_id is well known and feed is a required one
Do you mean required by the spec? This case is not checked in the implementation though. And wouldn't it be more appropriate to check that it is present in the discovery file?
I switched to In case a requested feed is not found in the feedCache, If either the discovery file does not exist or is incomplete, we also return @testower before I continue to implement likewise test and behavior for v3, could you review, please? I.e. checking the GBFS feeds in |
src/main/java/org/entur/lamassu/controller/GBFSV2FeedController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/entur/lamassu/controller/GBFSV2FeedController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/entur/lamassu/controller/GBFSV2FeedController.java
Outdated
Show resolved
Hide resolved
@hbruch added a few comments
Maybe a way to make it feel less clumsy: #432 (comment) ? |
e4b8516
to
1b3a164
Compare
I think this PR is good for review. I implemented the same logic for all three updaters and added tests for |
Summary
This PR changes the 404 to an 503 http status code reply when a requested system feed it not found but it's system_id is configured.
Issue
Closes #431 .
Unit tests
Manually verified.