Closed Bug 1840453 Opened 1 year ago Closed 1 year ago

Retry when the API is unavailable

Categories

(Firefox :: Shopping, task, P2)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: fchasen, Assigned: fchasen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-shopping])

Attachments

(1 file)

Update the API client to automatically retry when the API is unreachable (and we are online) or returns any 5XX error code.

This should probably be ~3 try, with an exponential back off?

Severity: -- → S3
Priority: -- → P2

Will also need to track request state with this to prevent from calling multiple times.

Assignee: nobody → fchasen
Status: NEW → ASSIGNED
Blocks: 1840452
  • ShoppingProduct API client will retry 3 times when the API returns a 500 error
  • Exponentially increasing back off wait with each retry
  • Added some random jitter to prevent all request from retrying at the same time
  • Added tests for 400 errors returned by API
  • Made request method public so it can be tested and used directly
Blocks: 1844158
Pushed by fchasen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b59d0cee3f2d Retry Shopping API after 500 errors r=shopping-reviewers,jhirsch,Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: