0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/server/models
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
..
base Error creation (#7477) 2016-10-06 13:27:35 +01:00
plugins Error creation (#7477) 2016-10-06 13:27:35 +01:00
accesstoken.js Add token added event, update last_login 2016-06-09 09:17:06 +01:00
app-field.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app-setting.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
client-trusted-domain.js Add table columns for OAuth 2015-09-02 13:39:22 +01:00
client.js post-scheduling 2016-06-14 10:52:13 +02:00
index.js 🎨 Separate invites from user 2016-09-26 11:08:43 +02:00
invite.js 🎨 Separate invites from user 2016-09-26 11:08:43 +02:00
permission.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
post.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
refreshtoken.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
role.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
settings.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
subscriber.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
tag.js internal tags feature 2016-06-11 09:12:04 -06:00
user.js Error creation (#7477) 2016-10-06 13:27:35 +01:00