From 2afff11a5e0cc668a2ce16240609a140da5da3a0 Mon Sep 17 00:00:00 2001 From: VP <54472340+vveeps@users.noreply.github.com> Date: Wed, 20 Oct 2021 21:17:30 +0300 Subject: [PATCH] handle LOAD_FAILED loadtype without erroring xd --- pomice/pool.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pomice/pool.py b/pomice/pool.py index f0a8606..bca050e 100644 --- a/pomice/pool.py +++ b/pomice/pool.py @@ -423,10 +423,8 @@ class Node: raise TrackLoadError("There was an error while trying to load this track.") elif load_type == "LOAD_FAILED": - raise TrackLoadError( - f"There was an error of severity '{data['severity']}' " - f"while loading tracks.\n\n{data['cause']}" - ) + exception = data["exception"] + raise TrackLoadError(f"{exception['message']} [{exception['severity']}]") elif load_type == "NO_MATCHES": return None