feat: add email code log
This commit is contained in:
@@ -102,8 +102,6 @@ class UserLoginStartCommand:
|
|||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._logger.info(f'payload: {payload})')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._messanger.publish_to_queue(
|
await self._messanger.publish_to_queue(
|
||||||
queue=settings.RABBIT_EMAIL_CODE_QUEUE,
|
queue=settings.RABBIT_EMAIL_CODE_QUEUE,
|
||||||
@@ -123,7 +121,7 @@ class UserLoginStartCommand:
|
|||||||
self._logger.error(f'Failed to publish login email event for {email}: {str(exception)}')
|
self._logger.error(f'Failed to publish login email event for {email}: {str(exception)}')
|
||||||
raise ApplicationException(503, 'Temporary error. Please try again.')
|
raise ApplicationException(503, 'Temporary error. Please try again.')
|
||||||
|
|
||||||
self._logger.info(f'login code created for {email}')
|
self._logger.info(f'Login email verification code queued email={email} code={code}')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
self._logger.error(f'login start failed: code space exhausted for {email}')
|
self._logger.error(f'login start failed: code space exhausted for {email}')
|
||||||
|
|||||||
@@ -102,8 +102,6 @@ class UserRegistrationStartCommand:
|
|||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._logger.info(f'payload: {payload})')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._messanger.publish_to_queue(
|
await self._messanger.publish_to_queue(
|
||||||
queue=settings.RABBIT_EMAIL_CODE_QUEUE,
|
queue=settings.RABBIT_EMAIL_CODE_QUEUE,
|
||||||
@@ -123,7 +121,7 @@ class UserRegistrationStartCommand:
|
|||||||
self._logger.error(f'Failed to publish registration email event for {email}: {str(exception)}')
|
self._logger.error(f'Failed to publish registration email event for {email}: {str(exception)}')
|
||||||
raise ApplicationException(503, 'Temporary error. Please try again.')
|
raise ApplicationException(503, 'Temporary error. Please try again.')
|
||||||
|
|
||||||
self._logger.info(f'Registration code created for {email}')
|
self._logger.info(f'Registration email verification code queued email={email} code={code}')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
self._logger.error(f'Registration start failed: code space exhausted for {email}')
|
self._logger.error(f'Registration start failed: code space exhausted for {email}')
|
||||||
|
|||||||
Reference in New Issue
Block a user