mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
handle PublishArtistError in a different way
This commit is contained in:
parent
f5c331bcb9
commit
f45af87787
1 changed files with 10 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue