feat: Auto handle Http 429 Too Many Requests with retry

- Must be explicitly enabled for a request
- Uses Retry-After Header if present, falls back to exponential back off
  starting with 10 seconds
- if retry delay is greater than 1 minute or it retries more than 3
  times then fail with a "Rate Limited" reason
- Sets task status to inform user of retry.

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2026-02-02 05:09:11 -07:00
parent 9171e2b2e1
commit e8da9ee4fb
No known key found for this signature in database
GPG key ID: B4CB507E51F8B89C
9 changed files with 75 additions and 3 deletions

View file

@ -40,6 +40,7 @@ void XboxUserStep::perform()
m_response.reset(new QByteArray());
m_request = Net::Upload::makeByteArray(url, m_response.get(), xbox_auth_data.toUtf8());
m_request->addHeaderProxy(std::make_unique<Net::RawHeaderProxy>(headers));
m_request->enableAutoRetry(true);
m_task.reset(new NetJob("XboxUserStep", APPLICATION->network()));
m_task->setAskRetry(false);