From f45af87787a8f06e656ddbbb24df043d940271f4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:48:00 +0200 Subject: [PATCH] handle PublishArtistError in a different way --- client/ayon_core/tools/publisher/models/publish.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/tools/publisher/models/publish.py b/client/ayon_core/tools/publisher/models/publish.py index e15f4f6080..4afcc5772d 100644 --- a/client/ayon_core/tools/publisher/models/publish.py +++ b/client/ayon_core/tools/publisher/models/publish.py @@ -15,7 +15,10 @@ from ayon_core.pipeline import ( OptionalPyblishPluginMixin, ) from ayon_core.pipeline.plugin_discover import DiscoverResult -from ayon_core.pipeline.publish import get_publish_instance_label +from ayon_core.pipeline.publish import ( + get_publish_instance_label, + PublishArtistError, +) from ayon_core.tools.publisher.abstract import AbstractPublisherBackend PUBLISH_EVENT_SOURCE = "publisher.publish.model" @@ -43,6 +46,12 @@ class PublishErrorInfo: @classmethod def from_exception(cls, exc): + if isinstance(exc, PublishArtistError): + return cls( + exc.description or exc.message, + title=exc.title, + detail=exc.detail, + ) title = "This is not your fault" detail = ( "Please report the error to your pipeline support"