Ghost/core/server/errors
Hannah Wolfe 20f4166cc5 Version matching middleware
refs #6949

- Adds a new VersionMismatchError with status 400 (bad request)
- Adds middleware that checks the X-Ghost-Version header if it is provided
- If it is not provided, the middleware does nothing
- If it is provided, and the versions match, the middleware does nothing
- If it is provided, and the versions don't match, the middleware returns a VersionMismatchError
- Includes both unit and a functional test to prove the middleware works alone and as part of the whole system
2016-06-09 17:08:44 +01:00
..
bad-request-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
data-import-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
email-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
index.js Version matching middleware 2016-06-09 17:08:44 +01:00
internal-server-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
method-not-allowed-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
no-permission-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
not-found-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
request-too-large-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
token-revocation-error.js Refactor authentication API into pipeline format 2016-03-07 11:53:54 -06:00
too-many-requests-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
unauthorized-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
unsupported-media-type-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
validation-error.js Disambiguate between error code & status code 2016-02-17 15:20:49 +00:00
version-mismatch-error.js Version matching middleware 2016-06-09 17:08:44 +01:00