Unify error message for the middleware
This commit is contained in:
parent
3d4c513be9
commit
9a76281d22
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ import * as jose from "jose";
|
||||||
import type { Middleware, Request } from "retes";
|
import type { Middleware, Request } from "retes";
|
||||||
import { Response } from "retes/response";
|
import { Response } from "retes/response";
|
||||||
|
|
||||||
import { SALEOR_AUTHORIZATION_BEARER_HEADER } from "./const";
|
import { SALEOR_AUTHORIZATION_BEARER_HEADER, SALEOR_SIGNATURE_HEADER } from "./const";
|
||||||
import { getSaleorHeaders } from "./headers";
|
import { getSaleorHeaders } from "./headers";
|
||||||
import { jwksUrl } from "./urls";
|
import { jwksUrl } from "./urls";
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ export const withWebhookSignatureVerified =
|
||||||
if (!payloadSignature) {
|
if (!payloadSignature) {
|
||||||
return Response.BadRequest({
|
return Response.BadRequest({
|
||||||
success: false,
|
success: false,
|
||||||
message: "Missing payload signature.",
|
message: `${ERROR_MESSAGE} Missing ${SALEOR_SIGNATURE_HEADER} header.`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue