@@ -314,6 +314,8 @@ class BusinessHostAPIView(APIView): return Response({'detail': str(err)}, status=status.HTTP_400_BAD_REQUEST) except AdminCreateForbidden as err: return Response({'detail': str(err)}, status=status.HTTP_403_FORBIDDEN) + except DomainNotFound: + return Response({'detail': _('Email sending error: email not found')}, status=status.HTTP_400_BAD_REQUEST) except Exception as err: return Response({'detail': f'{err}'}, status=status.HTTP_400_BAD_REQUEST) @@ -364,6 +366,8 @@ class ReinviteBusinessAccountAPIView(APIView): ) BusinessHostService(request.user).reinvite_business_account(business_account=business_account) return Response({'detail': _('Business account has been reinvited')}, status=status.HTTP_200_OK) + except DomainNotFound: + return Response({'detail': _('Email sending error: email not found')}, status=status.HTTP_400_BAD_REQUEST) except LetterNotFound as exc: return Response({'detail': f'{exc}'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) except LetterUnknownException as exc: @@ -590,6 +590,10 @@ msgstr "Сотрудник успешно удален" msgid "Business account has been reinvited" msgstr "Повторное приглашение сотруднику успешно отправлено" +#: authentication/views.py:367 +msgid "Email sending error: email not found" +msgstr "Ошибка отправки письма: email не найден" + #: authentication/views.py:420 msgid "Business account password has been updated" msgstr "Пароль сотрудника успешно обновлен"