Exceptions
wingpy.exceptions
¶
AuthenticationFailure
¶
InvalidEndpointError
¶
InvalidEndpointError(
message: str = "",
client: ApiClient | None = None,
endpoint_path: str | None = None,
)
Bases: WingpyException
Raised when the specified API endpoint path is not valid for use in a URL.
__str__
¶
Return a detailed error message including the full URL if possible.
Source code in src/wingpy/exceptions.py
InvalidResponseError
¶
Bases: WingpyException
Raised when the API returned an invalid or unexpected HTTP response.
__str__
¶
MissingPathParameterError
¶
MissingPathParameterError(
message: str = "",
parameter: str | None = None,
available_params: str | None = None,
client: ApiClient | None = None,
endpoint_path: str | None = None,
)
Bases: WingpyException
Raised when a required path parameter is missing for URL construction.
__str__
¶
Source code in src/wingpy/exceptions.py
URLNetlocError
¶
URLPathError
¶
Bases: WingpyException
Raised when the provided base URL ends with a forward slash (/).
URLSchemaError
¶
Bases: WingpyException
Raised when the provided base URL does not include a valid schema (http or https).
UnexpectedPayloadError
¶
UnsupportedMethodError
¶
UnsupportedMethodError(
message: str = "",
method: (
Literal["DELETE", "GET", "PATCH", "POST", "PUT"]
| None
) = None,
client: ApiClient | None = None,
)
Bases: WingpyException
Raised when the an unsupported HTTP method is used on a client instance.
Some APIs do not support all HTTP methods, and all methods must be implemented by client classes.
Examples:
- An API does not support the
PUT
HTTP method. - The user calls the
.put()
method on the instance. - The exception is raised.