display err.message to user if available in error msgs
							parent
							
								
									db996f678c
								
							
						
					
					
						commit
						a2be764681
					
				|  | @ -313,7 +313,7 @@ function _onAction(payload) { | |||
|                                 console.error("Conference call failed: " + err); | ||||
|                                 Modal.createDialog(ErrorDialog, { | ||||
|                                     title: "Failed to set up conference call", | ||||
|                                     description: "Conference call failed.", | ||||
|                                     description: "Conference call failed. " + ((err && err.message) ? err.message : ""), | ||||
|                                 }); | ||||
|                             }); | ||||
|                         } | ||||
|  |  | |||
|  | @ -413,7 +413,7 @@ module.exports = React.createClass({ | |||
|                                 console.error("Failed to leave room " + payload.room_id + " " + err); | ||||
|                                 Modal.createDialog(ErrorDialog, { | ||||
|                                     title: "Failed to leave room", | ||||
|                                     description: "Server may be unavailable, overloaded, or you hit a bug." | ||||
|                                     description: (err && err.message ? err.message : "Server may be unavailable, overloaded, or you hit a bug."), | ||||
|                                 }); | ||||
|                             }); | ||||
|                         } | ||||
|  |  | |||
|  | @ -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({ | ||||
|  |  | |||
|  | @ -223,7 +223,7 @@ module.exports = React.createClass({ | |||
|             console.error("Failed to load user settings: " + error); | ||||
|             Modal.createDialog(ErrorDialog, { | ||||
|                 title: "Can't load user settings", | ||||
|                 description: "Server may be unavailable or overloaded", | ||||
|                 description: ((error && error.message) ? error.message : "Server may be unavailable or overloaded"), | ||||
|             }); | ||||
|         }); | ||||
|     }, | ||||
|  | @ -264,8 +264,8 @@ module.exports = React.createClass({ | |||
|             console.error("Failed to set avatar: " + err); | ||||
|             var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|             Modal.createDialog(ErrorDialog, { | ||||
|                 title: "Error", | ||||
|                 description: "Failed to set avatar." | ||||
|                 title: "Failed to set avatar", | ||||
|                 description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|             }); | ||||
|         }); | ||||
|     }, | ||||
|  | @ -366,8 +366,8 @@ module.exports = React.createClass({ | |||
|             this.setState({email_add_pending: false}); | ||||
|             console.error("Unable to add email address " + email_address + " " + err); | ||||
|             Modal.createDialog(ErrorDialog, { | ||||
|                 title: "Error", | ||||
|                 description: "Unable to add email address" | ||||
|                 title: "Unable to add email address", | ||||
|                 description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|             }); | ||||
|         }); | ||||
|         ReactDOM.findDOMNode(this.refs.add_email_input).blur(); | ||||
|  | @ -391,8 +391,8 @@ module.exports = React.createClass({ | |||
|                         const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                         console.error("Unable to remove contact information: " + err); | ||||
|                         Modal.createDialog(ErrorDialog, { | ||||
|                             title: "Error", | ||||
|                             description: "Unable to remove contact information", | ||||
|                             title: "Unable to remove contact information", | ||||
|                             description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                         }); | ||||
|                     }).done(); | ||||
|                 } | ||||
|  | @ -432,8 +432,8 @@ module.exports = React.createClass({ | |||
|                 var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                 console.error("Unable to verify email address: " + err); | ||||
|                 Modal.createDialog(ErrorDialog, { | ||||
|                     title: "Error", | ||||
|                     description: "Unable to verify email address", | ||||
|                     title: "Unable to verify email address", | ||||
|                     description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                 }); | ||||
|             } | ||||
|         }); | ||||
|  |  | |||
|  | @ -308,8 +308,8 @@ module.exports = React.createClass({ | |||
|                 console.error(err.stack); | ||||
|                 var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                 Modal.createDialog(ErrorDialog, { | ||||
|                     title: "Error", | ||||
|                     description: "Failed to invite", | ||||
|                     title: "Failed to invite", | ||||
|                     description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                 }); | ||||
|                 return null; | ||||
|             }) | ||||
|  | @ -321,8 +321,8 @@ module.exports = React.createClass({ | |||
|                 console.error(err.stack); | ||||
|                 var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                 Modal.createDialog(ErrorDialog, { | ||||
|                     title: "Error", | ||||
|                     description: "Failed to invite user", | ||||
|                     title: "Failed to invite user", | ||||
|                     description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                 }); | ||||
|                 return null; | ||||
|             }) | ||||
|  | @ -342,8 +342,8 @@ module.exports = React.createClass({ | |||
|                 console.error(err.stack); | ||||
|                 var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                 Modal.createDialog(ErrorDialog, { | ||||
|                     title: "Error", | ||||
|                     description: "Failed to invite", | ||||
|                     title: "Failed to invite", | ||||
|                     description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                 }); | ||||
|                 return null; | ||||
|             }) | ||||
|  |  | |||
|  | @ -241,8 +241,8 @@ module.exports = WithMatrixClient(React.createClass({ | |||
|                         const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||||
|                         console.error("Kick error: " + err); | ||||
|                         Modal.createDialog(ErrorDialog, { | ||||
|                             title: "Error",  | ||||
|                             description: "Failed to kick user", | ||||
|                             title: "Failed to kick", | ||||
|                             description: ((err && err.message) ? err.message : "Operation failed"), | ||||
|                         }); | ||||
|                     } | ||||
|                 ).finally(()=>{ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Matthew Hodgson
						Matthew Hodgson