🐛(maildomain) fix domain access creation
During a new domain creation, a call to dimail is made to create user/allow on dimail side before owner role creation on our side. So when user/allow creation on dimain side fails, the owner role is not created on our side. Therefore the domain is created but invisible on the user interface. The user will probably try to create the same domain again and see the error message 'this domain already exists'. To avoid this we make sure to create owner role on our side despite dimail failure and set domain to failed status to retry later dimail access creation.
This commit is contained in:
@@ -245,7 +245,7 @@ class DimailAPIClient:
|
||||
except json.decoder.JSONDecodeError:
|
||||
error_content = response.content.decode(response.encoding)
|
||||
|
||||
logger.error(
|
||||
logger.exception(
|
||||
"[DIMAIL] unexpected error : %s %s", response.status_code, error_content
|
||||
)
|
||||
raise requests.exceptions.HTTPError(
|
||||
|
||||
Reference in New Issue
Block a user