From 672dd4fd79938961b25064894b66ab567dd351a7 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Fri, 1 Feb 2019 15:31:36 -0500 Subject: [PATCH] fix: better download error message If the SDK produces an uncaught error, show this also. It will help us with debugging. --- src/renderer/redux/actions/content.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/redux/actions/content.js b/src/renderer/redux/actions/content.js index 7cfeccfa4..b6a0ccb7f 100644 --- a/src/renderer/redux/actions/content.js +++ b/src/renderer/redux/actions/content.js @@ -174,6 +174,7 @@ function handleLoadVideoError(uri, errorType = '') { return (dispatch, getState) => { // suppress error when another media is playing const { playingUri } = getState().content; + const errorText = typeof errorType === 'object' ? errorType.message : errorType; if (playingUri && playingUri === uri) { dispatch({ type: ACTIONS.LOADING_VIDEO_FAILED, @@ -186,7 +187,7 @@ function handleLoadVideoError(uri, errorType = '') { } else { dispatch( doError( - `Failed to download ${uri}, please try again or see error details:\n\n${errorType}\n\nIf this problem persists, visit https://lbry.io/support for help. ` + `Failed to download ${uri}, please try again or see error details:\n\n${errorText}\n\nIf this problem persists, visit https://lbry.io/support for help. ` ) ); } -- 2.45.3