Errors#
Exceptions raised when an exchange with a server cannot be completed. An
Error the server itself returned is raised as the matching
SCIMException subclass instead.
- class scim2_client.SCIMClientException(message: str, source: Any = None, *args: Any, response: RawResponse | None = None, **kwargs: Any)[source]#
Base exception for scim2-client.
- class scim2_client.RequestNetworkException(*args: Any, **kwargs: Any)[source]#
Exception raised when a network error happened during request.
This exception is raised when a
httpx2.RequestErrorhas been caught while performing a request. The originalRequestErroris available with__cause__.
- class scim2_client.SCIMResponseException(message: str, source: Any = None, *args: Any, response: RawResponse | None = None, **kwargs: Any)[source]#
Base exception for errors happening during response payload validation.
- class scim2_client.UnexpectedStatusCodeException(status_code: int, *args: Any, **kwargs: Any)[source]#
Exception raised when a server returned an unexpected status code.
The status code is available with the
status_codeattribute.
- class scim2_client.UnexpectedContentTypeException(content_type: str, *args: Any, **kwargs: Any)[source]#
Exception raised when a server returned an unexpected Content-Type header.
The content type is available with the
content_typeattribute.
- class scim2_client.UnexpectedContentFormatException(*args: Any, **kwargs: Any)[source]#
Exception raised when a server returned a response in a non-JSON format.
- class scim2_client.ResponsePayloadValidationException(*args: Any, **kwargs: Any)[source]#
Exception raised when the server returned a payload that cannot be validated.
This exception is raised when a
ValidationErrorhas been caught while validating the server response payload. The originalValidationErroris available with__cause__.try: scim.query(User, "foobar") except ResponsePayloadValidationException as exc: print("Original validation error cause", exc.__cause__)
- class scim2_client.InvalidServiceDescriptionException(*args: Any, **kwargs: Any)[source]#
Exception raised when a server describes a service that cannot be composed.
This exception is raised when a
ScimProviderErrorhas been caught while building theScimProviderdescribing the server. The originalScimProviderErroris available with__cause__.