Skip to content

Commit

Permalink
fix: expand the list of exceptions on which we should retry
Browse files Browse the repository at this point in the history
  • Loading branch information
drnextgis authored and gadomski committed Jul 18, 2024
1 parent 170bbc3 commit c4acd5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit c4acd5c

Please sign in to comment.