Skip to content

fix(metadata): bound Audnexus HTTP requests to a 10s timeout#745

Draft
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/audnexus-request-timeout
Draft

fix(metadata): bound Audnexus HTTP requests to a 10s timeout#745
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/audnexus-request-timeout

Conversation

@kevinheneveld

Copy link
Copy Markdown
Contributor

Summary

  • Audnexus HTTP calls had no per-request timeout, falling back to the default 100s HttpClient.Timeout
  • Every catch in AudnexusService excluded OperationCanceledException, so a slow/unresponsive Audnexus response hung ~100s and then surfaced as an uncaught TaskCanceledException instead of a graceful "not found"
  • Mirrors AudibleApiClient's existing pattern: a locally-scoped CancellationTokenSource per request (10s), with TaskCanceledException caught and logged as a warning that returns null so callers fall through to normal not-found handling

Test plan

  • dotnet build — clean
  • dotnet test — 1467/1467 passing

Draft per PR-pacing convention (several PRs already active); will promote when a slot frees up.

Audnexus calls had no per-request timeout and relied on the default
100s HttpClient.Timeout, and every catch in AudnexusService excluded
OperationCanceledException, so a slow/unresponsive Audnexus response
hung for the full 100 seconds and then surfaced as an uncaught
TaskCanceledException instead of failing gracefully.

Mirrors AudibleApiClient's existing pattern: a locally-scoped
CancellationTokenSource per request, with TaskCanceledException caught
and logged as a warning that returns null so callers fall through to
their normal "not found" handling.
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.

1 participant