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
index.js
package.json Refactored @tryghost/mw-error-handler to assert 2024-05-06 12:01:08 +02:00