ump_sdk.errors
module ump-sdk
Client-side typed error for RFC 9457 problems returned by any UMP service.
Classes
Section titled “Classes”ProblemError
Section titled “ProblemError”class
class ProblemError(Exception)Raised by the SDK clients for any HTTP status >= 400. problem is the parsed RFC 9457
body (or a synthesised one when the server did not send problem+json).
Fields
| Name | Type | Default | Description |
|---|---|---|---|
problem | problem | ||
status | problem.status | ||
code | problem.code | ||
url | url |
Methods and properties (1)
init constructor
ProblemError(self, problem: Problem, *, url: str | None = None) -> NoneSource: packages/ump-sdk/src/ump_sdk/errors.py, line 14
Functions
Section titled “Functions”problem_from_response
Section titled “problem_from_response”function
def problem_from_response(resp: httpx.Response) -> ProblemErrorSource: packages/ump-sdk/src/ump_sdk/errors.py, line 26
unavailable
Section titled “unavailable”function
def unavailable(url: str, exc: Exception) -> ProblemErrorSource: packages/ump-sdk/src/ump_sdk/errors.py, line 49