osrd
osrd copied to clipboard
editoast: train-simulation: return SimulationFailed on 500 from core
When core.fetch returns an Error made from a 500 from core, train_simulation returns Ok(SimulationResponse::SimulationFailed) rather than an Error.
This allows to still be able to call train_schedule/simulation_summary when one of the trains leads to an error in core (an assert error for example).
I left other error status codes fail because they'll likely be transient, what do you think ?
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
Project coverage is 28.27%. Comparing base (
b05d26f) to head (1848027).
| Files | Patch % | Lines |
|---|---|---|
| editoast/src/views/v2/train_schedule.rs | 0.00% | 6 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## dev #7971 +/- ##
============================================
- Coverage 28.28% 28.27% -0.01%
Complexity 2075 2075
============================================
Files 1273 1273
Lines 156082 156087 +5
Branches 3081 3081
============================================
- Hits 44149 44136 -13
- Misses 110095 110113 +18
Partials 1838 1838
| Flag | Coverage Δ | |
|---|---|---|
| core | 75.03% <ø> (ø) |
|
| editoast | 70.96% <0.00%> (-0.06%) |
:arrow_down: |
| front | 9.93% <ø> (ø) |
|
| gateway | 2.34% <ø> (ø) |
|
| railjson_generator | 87.49% <ø> (ø) |
|
| tests | 72.93% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Would not work since 500 errors could come from core but also from diesel for example...