0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Update dependency @tryghost/mw-error-handler to v0.2.4 (#14677)

- Updated accept-version error message copy

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
This commit is contained in:
renovate[bot] 2022-05-05 08:57:32 +01:00 committed by GitHub
parent 7c795b4e26
commit 45695ef2d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 35 deletions

View file

@ -94,7 +94,7 @@
"@tryghost/metrics": "1.0.11", "@tryghost/metrics": "1.0.11",
"@tryghost/minifier": "0.1.13", "@tryghost/minifier": "0.1.13",
"@tryghost/mw-api-version-mismatch": "0.1.1", "@tryghost/mw-api-version-mismatch": "0.1.1",
"@tryghost/mw-error-handler": "0.2.2", "@tryghost/mw-error-handler": "0.2.4",
"@tryghost/mw-session-from-token": "0.1.30", "@tryghost/mw-session-from-token": "0.1.30",
"@tryghost/nodemailer": "0.3.22", "@tryghost/nodemailer": "0.3.22",
"@tryghost/nql": "0.9.2", "@tryghost/nql": "0.9.2",

View file

@ -165,11 +165,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_GHOST", "code": "UPDATE_GHOST",
"context": StringMatching /Provided client version v99\\\\\\.0 is ahead of current Ghost instance version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v99\\\\\\.0 is ahead of current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost instance.", "help": "Try upgrading your Ghost install.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -180,7 +180,7 @@ Object {
exports[`API Versioning Admin API responds with 406 for an unknown version with accept-version set ahead 2: [headers] 1`] = ` exports[`API Versioning Admin API responds with 406 for an unknown version with accept-version set ahead 2: [headers] 1`] = `
Object { Object {
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "347", "content-length": "348",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -194,11 +194,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_CLIENT", "code": "UPDATE_CLIENT",
"context": StringMatching /Provided client version v1\\\\\\.0 is outdated and is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v1\\\\\\.0 is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost API client.", "help": "Try upgrading your Ghost API client.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -209,7 +209,7 @@ Object {
exports[`API Versioning Admin API responds with 406 for an unknown version with accept-version set behind 2: [headers] 1`] = ` exports[`API Versioning Admin API responds with 406 for an unknown version with accept-version set behind 2: [headers] 1`] = `
Object { Object {
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "354", "content-length": "349",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -277,11 +277,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_CLIENT", "code": "UPDATE_CLIENT",
"context": StringMatching /Provided client version v3\\.5 is outdated and is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v3\\.5 is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost API client.", "help": "Try upgrading your Ghost API client.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -293,7 +293,7 @@ exports[`API Versioning Admin API responds with error and sends email ONCE when
Object { Object {
"access-control-allow-origin": "http://127.0.0.1:2369", "access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "354", "content-length": "349",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -307,11 +307,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_CLIENT", "code": "UPDATE_CLIENT",
"context": StringMatching /Provided client version v3\\.5 is outdated and is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v3\\.5 is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost API client.", "help": "Try upgrading your Ghost API client.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -323,7 +323,7 @@ exports[`API Versioning Admin API responds with error and sends email ONCE when
Object { Object {
"access-control-allow-origin": "http://127.0.0.1:2369", "access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "354", "content-length": "349",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -337,11 +337,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_GHOST", "code": "UPDATE_GHOST",
"context": StringMatching /Provided client version v999\\\\\\.1 is ahead of current Ghost instance version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v999\\\\\\.1 is ahead of current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost instance.", "help": "Try upgrading your Ghost install.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -353,7 +353,7 @@ exports[`API Versioning Admin API responds with error requested version is AHEAD
Object { Object {
"access-control-allow-origin": "http://127.0.0.1:2369", "access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "348", "content-length": "349",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -367,11 +367,11 @@ Object {
"errors": Array [ "errors": Array [
Object { Object {
"code": "UPDATE_CLIENT", "code": "UPDATE_CLIENT",
"context": StringMatching /Provided client version v3\\.1 is outdated and is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/, "context": StringMatching /Provided client accept-version v3\\.1 is behind current Ghost version v\\\\d\\+\\\\\\.\\\\d\\+/,
"details": null, "details": null,
"help": "Upgrade your Ghost API client.", "help": "Try upgrading your Ghost API client.",
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/, "id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"message": "Request not acceptable for provided Accept-Version header.", "message": "Request could not be served, the endpoint was not found.",
"property": null, "property": null,
"type": "RequestNotAcceptableError", "type": "RequestNotAcceptableError",
}, },
@ -383,7 +383,7 @@ exports[`API Versioning Admin API responds with error when requested version is
Object { Object {
"access-control-allow-origin": "http://127.0.0.1:2369", "access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "354", "content-length": "349",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,

View file

@ -93,7 +93,7 @@ describe('API Versioning', function () {
}) })
.matchBodySnapshot({ .matchBodySnapshot({
errors: [{ errors: [{
context: stringMatching(/Provided client version v999\.1 is ahead of current Ghost instance version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v999\.1 is ahead of current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}] }]
}); });
@ -112,7 +112,7 @@ describe('API Versioning', function () {
}) })
.matchBodySnapshot({ .matchBodySnapshot({
errors: [{ errors: [{
context: stringMatching(/Provided client version v3.1 is outdated and is behind current Ghost version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v3.1 is behind current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}] }]
}); });
@ -136,7 +136,7 @@ describe('API Versioning', function () {
}) })
.matchBodySnapshot({ .matchBodySnapshot({
errors: [{ errors: [{
context: stringMatching(/Provided client version v3.5 is outdated and is behind current Ghost version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v3.5 is behind current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}] }]
}); });
@ -158,7 +158,7 @@ describe('API Versioning', function () {
}) })
.matchBodySnapshot({ .matchBodySnapshot({
errors: [{ errors: [{
context: stringMatching(/Provided client version v3.5 is outdated and is behind current Ghost version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v3.5 is behind current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}] }]
}); });
@ -226,7 +226,7 @@ describe('API Versioning', function () {
'content-version': stringMatching(/v\d+\.\d+/) 'content-version': stringMatching(/v\d+\.\d+/)
}) })
.matchBodySnapshot({errors: [{ .matchBodySnapshot({errors: [{
context: stringMatching(/Provided client version v99\.0 is ahead of current Ghost instance version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v99\.0 is ahead of current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}]}); }]});
}); });
@ -241,7 +241,7 @@ describe('API Versioning', function () {
'content-version': stringMatching(/v\d+\.\d+/) 'content-version': stringMatching(/v\d+\.\d+/)
}) })
.matchBodySnapshot({errors: [{ .matchBodySnapshot({errors: [{
context: stringMatching(/Provided client version v1\.0 is outdated and is behind current Ghost version v\d+\.\d+/), context: stringMatching(/Provided client accept-version v1\.0 is behind current Ghost version v\d+\.\d+/),
id: anyErrorId id: anyErrorId
}]}); }]});
}); });

View file

@ -2301,10 +2301,10 @@
resolved "https://registry.yarnpkg.com/@tryghost/mw-api-version-mismatch/-/mw-api-version-mismatch-0.1.1.tgz#913c8941ebe274eac4c3ac872fbe6268534f0003" resolved "https://registry.yarnpkg.com/@tryghost/mw-api-version-mismatch/-/mw-api-version-mismatch-0.1.1.tgz#913c8941ebe274eac4c3ac872fbe6268534f0003"
integrity sha512-N1H3P/ua7MCJTQrhFd6RjBFL95pjB+y3Ih1ZyKToBzicU3RShLUsgVlBC7YNaJVGFG/RYCImzlm09QCV8qwgpg== integrity sha512-N1H3P/ua7MCJTQrhFd6RjBFL95pjB+y3Ih1ZyKToBzicU3RShLUsgVlBC7YNaJVGFG/RYCImzlm09QCV8qwgpg==
"@tryghost/mw-error-handler@0.2.2": "@tryghost/mw-error-handler@0.2.4":
version "0.2.2" version "0.2.4"
resolved "https://registry.yarnpkg.com/@tryghost/mw-error-handler/-/mw-error-handler-0.2.2.tgz#ab507e8b9079b6cbcbef2ac3fee4266342188165" resolved "https://registry.yarnpkg.com/@tryghost/mw-error-handler/-/mw-error-handler-0.2.4.tgz#9384be3f880c502a93e019b711cebe7ddb7c4abb"
integrity sha512-9J6d1gce+PzdLkSGxap5oWjG3INb3J9QLoC4NHXOqIGZ+7GERlao3q6AFVBo5xUBoUzkd+Q7+3ZQfeLarNEwUA== integrity sha512-KN6s2npnFXrFG6DnHpblrGHmwtV2soS2d7YQsEFoXksXQZZrwp60aoY5hFuBcjemchszHQA4C6efwjmE1BacKw==
dependencies: dependencies:
"@tryghost/debug" "^0.1.9" "@tryghost/debug" "^0.1.9"
"@tryghost/errors" "1.2.12" "@tryghost/errors" "1.2.12"