Class: Faraday::HttpSignature::VerifyError

Inherits:
Error
  • Object
show all
Defined in:
lib/faraday/http_signature/middleware.rb

Overview

Raised when HTTP response signature verification fails in strict mode.

Inherits from Error so that standard Faraday error handling (e.g. rescue Faraday::Error) catches verification failures. The original Linzer::VerifyError is preserved as #wrapped_exception and the Response is available via #response.

Examples:

Catching a verification failure

begin
  response = conn.get("/")
rescue Faraday::HttpSignature::VerifyError => e
  e.message            # => "Failed to verify message: Invalid signature."
  e.response           # => the Faraday::Response object
  e.wrapped_exception  # => the original Linzer::VerifyError
end

See Also: