Merge pull request #2257 from lbryio/fix-error-message2

fix: better download error message
This commit is contained in:
Sean Yesmunt 2019-02-01 15:54:20 -05:00 committed by GitHub
commit a8a43e1d69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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. `
)
);
}