Exception: Telnyx::Errors::WebhookVerificationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/telnyx/lib/webhook_verification_error.rb

Overview

Error raised when webhook signature verification fails.

This error is raised by the webhook verification module when:

  • No public key is configured

  • Required headers are missing (telnyx-signature-ed25519, telnyx-timestamp)

  • Timestamp is too old or too new (outside 5-minute tolerance)

  • Signature verification fails

  • Public key or signature format is invalid

Examples:

Handling verification errors

begin
  client.webhooks.verify!(payload, headers)
rescue Telnyx::Errors::WebhookVerificationError => e
  puts "Webhook verification failed: #{e.message}"
end

Instance Method Summary collapse

Constructor Details

#initialize(message:) ⇒ WebhookVerificationError

Returns a new instance of WebhookVerificationError.

Parameters:

  • message (String)

    The error message describing the verification failure



22
23
24
# File 'lib/telnyx/lib/webhook_verification_error.rb', line 22

def initialize(message:)
  super(message)
end