Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial 404 Error Handling Support #787

Merged
merged 1 commit into from
Sep 17, 2013

Conversation

cgiffard
Copy link
Contributor

Fixes #356

  • Adds new generic methods for handling errors to errorHandling.js
  • Initialises generic methods as middleware
  • Created error.hbs view in admin
  • Error handler searches for error.hbs view file in user theme folder
    and renders it if available, otherwise lets the error fall through
    to express.

Notes

  • We could change the final behaviour to render a default ghost
    template should the user template be missing
  • Because it currently isn't possible to require(ghost) in errorHandling.js,
    it was necessary to duplicate some aspects of the ghost path init code
    inside errorhandling.js. This should be cleaned up and moved back
    into ghost.js when possible.

Fixes #356

- Adds new generic methods for handling errors to errorHandling.js
- Initialises generic methods as middleware
- Created error.hbs view in admin
- Error handler searches for error.hbs view file in user theme folder
  and renders it if available, otherwise lets the error fall through
  to express.

- We *could* change the final behaviour to render a default ghost
  template should the user template be missing
- Because it currently isn't possible to require(ghost) in errorHandling.js,
  it was necessary to duplicate some aspects of the ghost path init code
  inside errorhandling.js. This should be cleaned up and moved back
  into ghost.js when possible.
ErisDS added a commit that referenced this pull request Sep 17, 2013
Initial 404 Error Handling Support
@ErisDS ErisDS merged commit b165dd3 into TryGhost:master Sep 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

404 error handling for admin & blog
2 participants