mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
[IMP] attachment_azure: downgrade ResourceExistsError log from ERROR to INFO
Using _logger.exception for a ResourceExistsError is misleading: the operation is harmless since blobs are content-addressed (SHA1) and filename is returned correctly regardless. Switch to _logger.info to avoid false-positive ERROR noise.
This commit is contained in:
@@ -177,8 +177,8 @@ 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(
|
_logger.info(
|
||||||
"Trying to re create an existing resource %s" % filename
|
"Resource already exists, skipping upload for %s", filename
|
||||||
)
|
)
|
||||||
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