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

editoast: train-simulation: return SimulationFailed on 500 from core #7971

Closed
wants to merge 1 commit into from

Conversation

Castavo
Copy link
Contributor

@Castavo Castavo commented Jul 7, 2024

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 ?

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2024

⚠️ Please install the 'codecov app svg image' 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 ⚠️

❗ 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%) ⬇️
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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Castavo
Copy link
Contributor Author

Castavo commented Jul 12, 2024

Would not work since 500 errors could come from core but also from diesel for example...

@Castavo Castavo closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants