Improve resiliency of the Transmodel API - #4806
Merged
Merged
Conversation
hannesj
marked this pull request as draft
February 9, 2023 15:51
hannesj
force-pushed
the
otp2_imrove_resiliency
branch
from
February 14, 2023 08:53
8649290 to
14ee947
Compare
hannesj
marked this pull request as ready for review
February 14, 2023 08:55
Codecov ReportBase: 62.14% // Head: 62.13% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4806 +/- ##
=============================================
- Coverage 62.14% 62.13% -0.01%
- Complexity 13002 13004 +2
=============================================
Files 1650 1650
Lines 66064 66076 +12
Branches 7184 7188 +4
=============================================
+ Hits 41057 41058 +1
- Misses 22667 22679 +12
+ Partials 2340 2339 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Bartosz-Kruba
approved these changes
Feb 14, 2023
t2gran
approved these changes
Feb 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains
twoone improvement:TripPlan, which we can show to the user together with the error. In this we include coordinates, which might be null, which will lead to an NPE. Instead pass in null all the way, and serialize it as 0 in the API, as it is a non-nullable type.Validation was made stricter to relaxGeneralizedCostAtDestination recently, which will throw an error if an invalid value is specified. Instead pre-validate the value and only set it if valid.Removed, as all clients are now fixed. However we should improve validation somehow already when parsing the value.