
* initial Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add entra mappings Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make API endpoints more consistent Signed-off-by: Jens Langhammer <jens@goauthentik.io> * implement more things Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add user tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix most group tests + fix bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more group tests, fix bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix missing __init__ Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add ui for provisioned users Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix a bunch of bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add `creating` to property mapping env Signed-off-by: Jens Langhammer <jens@goauthentik.io> * always sync group members Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix group membership Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some types Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add group member add test Signed-off-by: Jens Langhammer <jens@goauthentik.io> * create sync status component to dedupe Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix discovery tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * get rid of more code and fix more issues Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add error handling for auth and transient Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make sure autoretry is on Signed-off-by: Jens Langhammer <jens@goauthentik.io> * format web Signed-off-by: Jens Langhammer <jens@goauthentik.io> * wait for task in signal Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add squashed google migration Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
from authentik.lib.sentry import SentryIgnoredException
|
|
|
|
|
|
class BaseSyncException(SentryIgnoredException):
|
|
"""Base class for all sync exceptions"""
|
|
|
|
|
|
class TransientSyncException(BaseSyncException):
|
|
"""Transient sync exception which may be caused by network blips, etc"""
|
|
|
|
|
|
class NotFoundSyncException(BaseSyncException):
|
|
"""Exception when an object was not found in the remote system"""
|
|
|
|
|
|
class ObjectExistsSyncException(BaseSyncException):
|
|
"""Exception when an object already exists in the remote system"""
|
|
|
|
|
|
class BadRequestSyncException(BaseSyncException):
|
|
"""Exception when invalid data was sent to the remote system"""
|
|
|
|
|
|
class StopSync(BaseSyncException):
|
|
"""Exception raised when a configuration error should stop the sync process"""
|
|
|
|
def __init__(
|
|
self, exc: Exception, obj: object | None = None, mapping: object | None = None
|
|
) -> None:
|
|
self.exc = exc
|
|
self.obj = obj
|
|
self.mapping = mapping
|
|
|
|
def detail(self) -> str:
|
|
"""Get human readable details of this error"""
|
|
msg = f"Error {str(self.exc)}"
|
|
if self.obj:
|
|
msg += f", caused by {self.obj}"
|
|
if self.mapping:
|
|
msg += f" (mapping {self.mapping})"
|
|
return msg
|