fill title if is not avaialble in exception

This commit is contained in:
Jakub Trllo 2024-09-02 14:32:52 +02:00
parent 10684239e9
commit 71623cd0bd

View file

@ -51,13 +51,13 @@ class PublishErrorInfo:
@classmethod
def from_exception(cls, exc) -> "PublishErrorInfo":
title = "This is not your fault"
if isinstance(exc, PublishArtistError):
return cls(
exc.description or exc.message,
title=exc.title,
title=exc.title or title,
detail=exc.detail,
)
title = "This is not your fault"
if isinstance(exc, KnownPublishError):
msg = str(exc)
else: