Skip to content

Resolve "Change the ApiRetry wrapper to optionally handle 500 errors too"

Tyler Williams requested to merge 10122-change-apiretry-logic into master

Why is this change being made?

We want to expand the scope of ApiRetry wrapper to handle some additional 500 errors and other classes of errors that can be retried, as per #10122 (closed).

This also adds some spec coverage for the changes, and moves the ApiRetry module into a higher level directory since it's used elsewhere.

I don't think this will resolve all of the errors we hoped to catch, but it should catch a few. It also uses a (very simplified) exponential backoff algorithm, so we get some time between retries.

Author Checklist

  • Provided a concise title for the MR
  • Added a description to this MR explaining the reasons for the proposed change, per say-why-not-just-what
  • Assign this change to the correct DRI
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the "Maintained by" section in on the page being edited.
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies.
    • If the changes relate to any part of the project other than updates to content and/or data files please make sure to ping @gl-static-site-editor in a comment for a review and merge. For example changes to .gitlab-ci.yml, JavaScript/CSS/Ruby code or the layout files. (this requirement has been removed pending identification of a new DRI for the handbook)

Closes #10122 (closed)

Edited by Tyler Williams

Merge request reports