catch 500 error

This commit is contained in:
meisnate12 2022-02-10 10:13:14 -05:00
parent 16049b7a45
commit 1e79f32256
3 changed files with 5 additions and 4 deletions

View file

@ -1 +1 @@
1.15.1-develop61
1.15.1-develop62

View file

@ -379,7 +379,7 @@ class ConfigFile:
try:
self.OMDb = OMDb(self, {
"apikey": check_for_attribute(self.data, "apikey", parent="omdb", throw=True),
"cache_expiration": check_for_attribute(self.data, "cache_expiration", parent="settings", var_type="int", default=60)
"expiration": check_for_attribute(self.data, "cache_expiration", parent="settings", var_type="int", default=60)
})
except Failed as e:
self.errors.append(e)

View file

@ -4,6 +4,7 @@ from modules import util
from modules.meta import MetadataFile
from modules.util import Failed
from PIL import Image
from plexapi.exceptions import BadRequest
from ruamel import yaml
logger = logging.getLogger("Plex Meta Manager")
@ -185,9 +186,9 @@ class Library(ABC):
self.edit_tags("label", item, add_tags=[f"{overlay_name} Overlay"])
poster_uploaded = True
logger.info(f"Detail: Overlay: {overlay_name} applied to {item.title}")
except OSError as e:
except (OSError, BadRequest) as e:
util.print_stacktrace()
logger.error(f"Overlay Error: {e}")
raise Failed(f"Overlay Error: {e}")
background_uploaded = False
if background is not None: