-
Notifications
You must be signed in to change notification settings - Fork 131
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
Navitia: Add Brazil providers #179
base: master
Are you sure you want to change the base?
Conversation
Currently working in São Paulo, Rio de Janeiro, Belo Horizonte and Porto Allegre
@@ -721,6 +721,9 @@ public NearbyLocationsResult queryNearbyLocations(final EnumSet<LocationType> ty | |||
|
|||
try { | |||
final JSONObject head = new JSONObject(page.toString()); | |||
if (head.has("error")) { | |||
return new NearbyLocationsResult(resultHeader, Status.INVALID_ID); | |||
} |
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.
One of the live tests with an invalid station arrived here and head
had no pagination
, but an error
.
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.
Maybe this change should go into a different PR that implements error handling for all Navitia calls?
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.
You seem to be merging PRs manually somehow. Couldn't you just split these 3 lines out into a separate commit when you do? I am happy to waive ownership on them.
What's the difference between the two providers. Is one of the datasets likely to be a superset of the other? |
The The |
63d8043
to
2e5f16d
Compare
b017ce1
to
28dd2c8
Compare
Any update on this? |
I just merged the Navitia-based provider. The other one currently only throws errors. I must admit I'm a bit reluctant on merging – is there any chance this can go to Navitia too? If we continue, this needs a rebase. |
Currently working in São Paulo, Rio de Janeiro, Belo Horizonte and Porto Alegre.
Both providers have been used in Transportr already. Time to upstream.