Skip to content

Implement ShadeError base exception class #15

Closed

Description

@codebestia

Description

All SDK-specific errors must inherit from a common ShadeError so callers can catch all SDK errors with a single except ShadeError. It should carry a human-readable message, the HTTP status_code (if applicable), and the raw response_body for debugging.

Proposed Steps

  • Create src/shade/errors.py.
  • Define ShadeError(Exception) with __init__(self, message, status_code=None, response_body=None).
  • Add __str__ returning a formatted string including the status code when present.
  • All other exceptions in this file must subclass ShadeError.

Acceptance Criteria

  • except shade.ShadeError catches all SDK errors.
  • str(error) includes both the message and the HTTP status code when present.
  • error.response_body contains the raw API response as a string.
  • ShadeError can be raised standalone (e.g. for contract-level errors with no HTTP context).

Activity

  1. Errordog2 commented on Jun 20, 2026

    @Errordog2
    Contributor

    /attempt #15

    Implemented the SDK error base class in #21: shade.ShadeError, HTTP context fields, package-root exports, and tests covering standalone/base/subclass behavior.

  2. nayt9 commented on Jun 20, 2026

    @nayt9

    Hello sir , my name is Nathan. I’m smart contract developer, and I’d love to contribute to this project. I’m comfortable working with modern frontend tools and blockchain technologies, and I can deliver tasks quickly often within 24 hours.
    Please let me know how I can get started or if there are any issues suitable for a first contribution.

  3. grantfox-oss commented on Jun 22, 2026

    @grantfox-oss

    🦊 GrantFox — @nayt9 has been assigned to this issue as part of the Official Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #15)
    2. Your PR will be reviewed by the ShadeProtocol maintainers

    Good luck! Track your progress on GrantFox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions