from collections.abc import Iterable
from typing import Any
from scim2_models import SCIMException
[docs]
class MethodNotAllowedException(SCIMException):
"""The endpoint does not support the method of the request.
Corresponds to HTTP status 405, with no scimType. The response lists the
supported methods in its :mdn:`Allow` header (:rfc:`RFC 9110 §15.5.6 <9110#section-15.5.6>`).
:param allowed: The methods the endpoint supports.
"""
status = 405
_default_detail = "The endpoint does not support this method"
def __init__(self, *, allowed: Iterable[str] = (), **kwargs: Any):
super().__init__(**kwargs)
self.allowed = sorted(set(allowed))