4c35e00721
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 |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json |