Skip to content
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

fix: expand the list of exceptions on which we should retry #195

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- Expand the list of exceptions on which we should retry for HTTP ([#195](https://github.com/stac-utils/stac-asset/pull/195))

## [0.4.1] - 2024-07-17

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/stac_asset/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from types import TracebackType
from typing import AsyncIterator, Optional, Type, TypeVar

from aiohttp import ClientResponseError, ClientSession, ClientTimeout
from aiohttp import ClientError, ClientSession, ClientTimeout
from aiohttp_oauth2_client.client import OAuth2Client
from aiohttp_oauth2_client.models.grant import GrantType
from aiohttp_retry import JitterRetry, RetryClient
Expand Down Expand Up @@ -113,7 +113,7 @@ async def from_config(cls: Type[T], config: Config) -> T:
session = RetryClient(
client_session=session,
retry_options=JitterRetry(
attempts=config.http_max_attempts, exceptions={ClientResponseError}
attempts=config.http_max_attempts, exceptions={ClientError}
),
)
return cls(session, config.http_check_content_type)
Expand Down