display err.message to user if available in error msgs

This commit is contained in:
Matthew Hodgson 2017-04-23 01:48:27 +01:00
parent db996f678c
commit a2be764681
6 changed files with 21 additions and 21 deletions

View file

@ -947,7 +947,7 @@ module.exports = React.createClass({
console.error("Failed to upload file " + file + " " + error);
Modal.createDialog(ErrorDialog, {
title: "Failed to upload file",
description: "Server may be unavailable, overloaded, or the file too big",
description: ((error && error.message) ? error.message : "Server may be unavailable, overloaded, or the file too big"),
});
});
},
@ -1034,7 +1034,7 @@ module.exports = React.createClass({
console.error("Search failed: " + error);
Modal.createDialog(ErrorDialog, {
title: "Search failed",
description: "Server may be unavailable, overloaded, or search timed out :("
description: ((error && error.message) ? error.message : "Server may be unavailable, overloaded, or search timed out :("),
});
}).finally(function() {
self.setState({