-
Notifications
You must be signed in to change notification settings - Fork 102
tech: correctif sur la gestion des errs pour les retours d'API siret #12273
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
base: main
Are you sure you want to change the base?
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: app/models/champs/siret_champ.rb
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12273 +/- ##
==========================================
- Coverage 89.50% 89.48% -0.02%
==========================================
Files 1338 1341 +3
Lines 30341 30369 +28
Branches 6351 6354 +3
==========================================
+ Hits 27156 27177 +21
- Misses 3185 3192 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ab40327 to
4022378
Compare
4022378 to
9dabfe2
Compare
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.
ok, ca va faire du bien a court terme.
J'ai l'impression qu'il va falloir des changements plus conséquents pour avoir un truc lisible, dans des prs à venir.
- aujourd'hui, pour qu un job soit rejoué il faut 2 choses : un
Failure(retryable: true)et une error qui soit dansTRANSIENT_ERRORS. C'est compliqué. Je propose qu'on modifie le système pour que justeretryable: truesuffise 💡 reasondoit s'appelererrorouinner_errorsinon on ne comprend pas qu'il faut mettre dedans une ...Error🤦- on fait une ici une mécanique compliquée ou
APIEntreprise::APIwrap une première fois des erreurs Typhoeus dans des ApiEntrepriseError. Puis ces erreurs sont à nouveau wrappés dans des erreurs Excon 🤯
Now, returning a Failure(retryable: true) is enough to trigger a retry
- use original error if possible - use StandardError otherwise - token error is not retryable
02bff97 to
84ea4dd
Compare
sentry: https://demarches-simplifiees.sentry.io/issues/6987789903/?environment=production&project=1429550&query=is%3Aunresolved&referrer=issue-stream