Ghost/ghost/mw-error-handler
Daniel Lockyer 4c35e00721 Fixed handling of invalid Accept-Version header
fix https://linear.app/tryghost/issue/SLO-96/invalid-version-must-be-a-string-got-type-object-an-unexpected-error

- in the event that a non-semver Accept-Version header is given, the
  current code will throw an error because the semver lib can't compare null
  against a valid version
- the error in question is `Must be a string. Got type "object"`
- to fix this, we can just detect a null and early return with a
  BadRequestError
- also adds a breaking test
2024-05-06 12:01:08 +02:00
..
lib Fixed handling of invalid Accept-Version header 2024-05-06 12:01:08 +02:00
test Fixed handling of invalid Accept-Version header 2024-05-06 12:01:08 +02: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 Refactored @tryghost/mw-error-handler to assert 2024-05-06 12:01:08 +02:00