Skip to content

Implement NetworkError #20

@codebestia

Description

@codebestia

Description

Raised when a request fails due to a client-side network issue — DNS failure, connection refused, timeout — rather than an API error response. Wraps the underlying httpx exception for context.

Proposed Steps

  • Define NetworkError(ShadeError) in errors.py.
  • Add original_error: Exception attribute.
  • Catch httpx.ConnectError, httpx.TimeoutException, httpx.ReadError in the HTTP client and re-raise as NetworkError.

Acceptance Criteria

  • A connection timeout raises NetworkError with original_error set to the httpx exception.
  • str(error) includes a human-readable description of the network failure.
  • Does not suppress KeyboardInterrupt or SystemExit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions