Skip to content

v1.1.1

Choose a tag to compare

@ftsartek ftsartek released this 20 Jul 02:03
b23b582

Added

  • A fuller error hierarchy matching the Python client: InputException (renamed from InvalidArgumentException), TransportException, ResponseException (with ResponseParseException as a subclass), and ApiStatusException with ClientException (4xx) and ApiException (5xx). Catching SthAI\Exception\SthAIException still handles everything the client can throw.
  • HTTP error responses now parse the server's {"error": {"message": ..., "type": ...}} body: ClientException and ApiException carry getStatusCode(), getResponseBody(), getServerMessage() and getErrorType().

What's Changed

  • feat!: remap exceptions into a package-specific error hierarchy by @ftsartek in #3

Full Changelog: v1.1.0...v1.1.1