Ghost/ghost/admin/app/controllers/error.js

22 lines
474 B
JavaScript
Raw Normal View History

import Controller from '@ember/controller';
export default class ErrorController extends Controller {
stack = false;
get error() {
return this.model;
}
get code() {
return this.error.status > 200 ? this.error.status : 500;
}
get message() {
if (this.code === 404) {
2015-06-08 13:13:42 +03:00
return 'Page not found';
}
return this.error.statusText !== 'error' ? this.error.statusText : 'Internal Server Error';
}
}