mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
[IMP] attachment_azure: add stack_info on ResourceExistsError
The blob already exists, so the exception traceback (inside upload_blob) is not useful on its own. Adding stack_info=True to _logger.exception() also logs the call stack, revealing who triggered the duplicate write.
This commit is contained in:
@@ -177,8 +177,12 @@ class IrAttachment(models.Model):
|
|||||||
try:
|
try:
|
||||||
blob_client.upload_blob(file, blob_type="BlockBlob")
|
blob_client.upload_blob(file, blob_type="BlockBlob")
|
||||||
except ResourceExistsError:
|
except ResourceExistsError:
|
||||||
_logger.exception(
|
(
|
||||||
"Trying to re create an existing resource %s" % filename
|
_logger.exception(
|
||||||
|
"Trying to re create an existing resource %s",
|
||||||
|
filename,
|
||||||
|
stack_info=True,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
except HttpResponseError as error:
|
except HttpResponseError as error:
|
||||||
# log verbose error from azure, return short message for user
|
# log verbose error from azure, return short message for user
|
||||||
|
|||||||
Reference in New Issue
Block a user