Ghost/core
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
..
client@18b5ca27f6 Updated Admin to v4.22.4 2021-11-19 16:00:31 +00:00
frontend Merged our two maintenance middleware into one 2021-11-24 11:27:18 +00:00
server Added err.context & err.help to stack traces 2021-11-24 13:01:06 +00:00
shared Added productCard labs flag 2021-11-22 11:46:28 +01:00
app.js Merged our two maintenance middleware into one 2021-11-24 11:27:18 +00:00
boot.js Merged our two maintenance middleware into one 2021-11-24 11:27:18 +00:00
bridge.js Added missing async/await calls 2021-11-23 17:24:50 +00:00