Handling Errors

Errors are handled by the <View> component, which has a handleError method stored in the view context. You should always use a try...catch statement around any asynchronous code that may encounter an error. Inside your catch method, you can then call the view error handler and pass the error object.
try {
catch (err){
This will display a banner notification along the top of the view, with the error message text and also a console log.