0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/middleware
Katharina Irrgang d81bc91bd2 Error creation (#7477)
refs #7116, refs #2001

- Changes the way Ghost errors are implemented to benefit from proper inheritance
- Moves all error definitions into a single file
- Changes the error constructor to take an options object, rather than needing the arguments to be passed in the correct order.
- Provides a wrapper so that any errors that haven't already been converted to GhostErrors get converted before they are displayed.

Summary of changes:

* 🐛  set NODE_ENV in config handler
*   add GhostError implementation (core/server/errors.js)
  - register all errors in one file
  - inheritance from GhostError
  - option pattern
* 🔥  remove all error files
*   wrap all errors into GhostError in case of HTTP
* 🎨  adaptions
  - option pattern for errors
  - use GhostError when needed
* 🎨  revert debug deletion and add TODO for error id's
2016-10-06 13:27:35 +01:00
..
api Error creation (#7477) 2016-10-06 13:27:35 +01:00
validation Error creation (#7477) 2016-10-06 13:27:35 +01:00
cache-control.js deps: grunt-jscs@2.1.0 2015-10-12 19:21:16 +01:00
check-ssl.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
cors.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
decide-is-admin.js Moves the decideIsAdmin into its own file. 2015-06-09 14:02:22 -07:00
error-handler.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
index.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
labs.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
maintenance.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
redirect-to-setup.js Ghost OAuth (#7451) 2016-09-30 12:45:59 +01:00
serve-shared-file.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
spam-prevention.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
static-theme.js 🎨 🔦 refactor content paths (images, apps, themes, storage, scheduling) 2016-09-20 15:59:34 +01:00
theme-handler.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
uncapitalise.js Remove open redirect by removing double slashes from redirects (#7247) 2016-08-23 13:47:59 +02:00