open-nomad/ui/app/utils/notify-error.js

8 lines
232 B
JavaScript
Raw Normal View History

2017-09-28 17:06:13 +00:00
// 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);
};
}