providers/scim: handle ServiceProviderConfig 404 (#4915)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-03-13 13:44:29 +01:00 committed by GitHub
parent afb7f8be3e
commit 178bfe1d44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,8 +88,8 @@ class SCIMClient(Generic[T, SchemaType]):
return ServiceProviderConfiguration.parse_obj(
self._request("GET", "/ServiceProviderConfig")
)
except ValidationError as exc:
self.logger.warning("ServiceProviderConfig invalid", exc=exc)
except (ValidationError, SCIMRequestException) as exc:
self.logger.warning("failed to get ServiceProviderConfig", exc=exc)
return default_config
def write(self, obj: T):