mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
15 lines
372 B
JavaScript
15 lines
372 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
/* eslint-disable ember/no-controller-access-in-routes */
|
|
|
|
// 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);
|
|
};
|
|
}
|