Ghost/ghost/mw-error-handler
Hannah Wolfe af94855349 Removed bluebird catch predicates from API endpoints
refs: https://github.com/TryGhost/Ghost/issues/14882

- I found a common pattern where catch predicates were being used to catch non-existent models in destroy methods, and sometimes elsewhere in the API endpoints
- The use of predicates is deprecated, and we're working to remove them from everywhere, so that we can remove bluebird
- In order to still handle these errors correctly, we needed a small change to mw-error-handler so that it can detect EmptyResponse errors from bookshelf, as well as 404s
Note: there is a small change as a result of this - the context on these errors now says "Resource not found" instead of "{ModelName} not found".
- I think this is acceptable for now, as we will be reviewing these errors in more depth later. It's quite easy to make changes, we just have to decide what with proper design input
2022-08-24 11:27:09 +01:00
..
lib Removed bluebird catch predicates from API endpoints 2022-08-24 11:27:09 +01:00
test Removed unused jsonErrorRenderer + renamed V2 2022-05-06 15:45:41 +01: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
package.json Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00