mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
OP-4196 - better logging of file upload errors
This commit is contained in:
parent
3cd241d2db
commit
3b81c7f573
1 changed files with 11 additions and 4 deletions
|
|
@ -188,10 +188,17 @@ class IntegrateSlackAPI(pyblish.api.InstancePlugin):
|
|||
channel=channel,
|
||||
title=os.path.basename(p_file)
|
||||
)
|
||||
attachment_str += "\n<{}|{}>".format(
|
||||
response["file"]["permalink"],
|
||||
os.path.basename(p_file))
|
||||
file_ids.append(response["file"]["id"])
|
||||
if response.get("error"):
|
||||
error_str = self._enrich_error(
|
||||
str(response.get("error")),
|
||||
channel)
|
||||
self.log.warning(
|
||||
"Error happened: {}".format(error_str))
|
||||
else:
|
||||
attachment_str += "\n<{}|{}>".format(
|
||||
response["file"]["permalink"],
|
||||
os.path.basename(p_file))
|
||||
file_ids.append(response["file"]["id"])
|
||||
|
||||
if publish_files:
|
||||
message += attachment_str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue