Ghost/ghost/mw-error-handler
Daniel Lockyer 10e97cad23 Handled unknown errors when preparing user message
- in the event we get an unknown error bubble up, we don't handle the
  templating on the error name
- `@tryghost/tpl` throws an error because we pass an undefined string:
  `Cannot read properties of undefined (reading 'replace')`
- this commit adds handling to fallback to a different user message in
  that event so we don't cause a 500 error
2022-03-24 10:06:55 +00:00
..
lib Handled unknown errors when preparing user message 2022-03-24 10:06:55 +00:00
test Handled unknown errors when preparing user message 2022-03-24 10:06:55 +00:00
.eslintrc.js Add @tryghost/mw-error-handler 2021-12-07 18:40:46 +00:00
index.js Add @tryghost/mw-error-handler 2021-12-07 18:40:46 +00:00
LICENSE 2022 2022-01-06 09:52:35 +00:00
package.json Published new versions 2022-03-21 09:38:38 +00:00
README.md 2022 2022-01-06 09:52:35 +00:00

Mw Error Handler

Install

npm install @tryghost/mw-error-handler --save

or

yarn add @tryghost/mw-error-handler

Usage

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.