handle grpc error
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
02cfc80b9f
commit
4a1332290f
|
@ -11,6 +11,7 @@ from django.http import HttpRequest
|
|||
from django.utils.translation import gettext as __
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views import View
|
||||
from grpc import RpcError
|
||||
from rest_framework.serializers import BaseSerializer, Serializer
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
|
@ -196,7 +197,7 @@ class MobileTransaction(ExpiringModel):
|
|||
)
|
||||
)
|
||||
LOGGER.debug("Sent notification", id=response, tx_id=self.tx_id)
|
||||
except ValueError as exc:
|
||||
except (ValueError, RpcError) as exc:
|
||||
LOGGER.warning("failed to push", exc=exc, tx_id=self.tx_id)
|
||||
return True
|
||||
|
||||
|
|
Reference in New Issue