open-nomad/ui/app/utils/notify-error.js
2017-10-05 14:39:37 -07:00

8 lines
232 B
JavaScript

// An error handler to provide to a promise catch to set an error
// on the application controller.
export default function notifyError(route) {
return error => {
route.controllerFor('application').set('error', error);
};
}