Ghost/core/server
Hannah Wolfe 5e931e2e37
Added err.context & err.help to stack traces
- When we handle errors in Ghost, we are supposed to use a pattern of supplying 3 messages:
   - message: what went wrong
   - context: details about why how or where the error happened
   - help: where the user can go to get help with this error
- We do this in many places and our JSON error handler and CLI error logging tools are designed to output this extra information
- However, stack traces, which start with message as the first line and then output the stack are totally missing this
- By injecting the additional messages into the stack once an error has been "ghostified" we should get clearer messages everywhere

Notes:
- I've additionally injected a "Stack Trace:" line that makes it easier to read the error vs the stack
- This code looks a little weird because the lines are inserted backwards, but that allows us to always to the insert at position 1 as per the comment,
   so we don't have to keep track of whether we already injected something or not
2021-11-24 13:01:06 +00:00
..
adapters Added ability to delete existing files through storage adapters 2021-11-09 16:07:23 +04:00
api Added Tenor contentFilter setting to config 2021-11-16 17:42:26 +00:00
data Added perf-improving PRAGMAs in testing mode 2021-11-19 10:47:21 +00:00
lib Renamed getLocalFileStoragePath 2021-11-05 17:17:18 +04:00
models Inlined package requires to save boot time and memory 2021-10-22 09:57:59 +02:00
services Added missing async/await calls 2021-11-23 17:24:50 +00:00
views Added new, simpler, linear boot process 2021-02-08 11:56:44 +00:00
web Added err.context & err.help to stack traces 2021-11-24 13:01:06 +00:00
analytics-events.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
ghost-server.js Switch to @tryghost/debug, remove ghost-ignition 2021-06-15 17:24:22 +01:00
notify.js Change to use @tryghost/logging 2021-06-15 15:59:11 +01:00
overrides.js Set global Luxon timezone override to UTC 2021-10-20 09:19:29 +02:00
run-update-check.js Removed remaining usage of i18n & translation file 2021-10-15 11:39:07 +01:00
update-check.js Inlined package requires to save boot time and memory 2021-10-22 09:57:59 +02:00