mesa.webhooks.on(...).
Options
Request
required
Incoming request object containing the raw JSON body and
x-mesa-signature header.Constructor requirement
receive(...) requires webhookSecret in the Mesa constructor. If omitted, it throws MissingWebhookSecretError.
Signature format
Thex-mesa-signature header contains query-style parts separated by commas, including t for timestamp and sha256 for the HMAC SHA-256 digest.
Response
ReturnsPromise<void> when verification, validation, and handler dispatch succeed.
Errors
MesaError
Thrown when
webhookSecret was not configured.MesaError
Thrown when the signature header is missing or malformed, the timestamp is outside the five-minute tolerance, the body is not JSON, or the payload fails schema validation.
Error
Thrown when one or more registered handlers reject after the webhook itself has been verified.
Schemas
The SDK exportsWebhookEventSchema plus individual payload schemas such as PushPayloadSchema, RepoCreatedPayloadSchema, and ChangeCreatedPayloadSchema for callers that need standalone validation.
