Component evidence

jwt/error.rb

ruby-jwt · lib/jwt/error.rb · ruby · MIT
auth

Defines exception classes for JWT encoding and decoding errors in Ruby applications.

Source preview first 800 characters · full source over MCP
# Source: https://github.com/jwt/ruby-jwt | License: MIT | Copyright 2011 Jeff Lindsay
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true

module JWT
  # The base error class for all JWT errors.
  class Error < StandardError; end

  # The EncodeError class is raised when there is an error encoding a JWT.
  class EncodeError < Error; end

  # The historical grouping of every error that is not an encoding error. Every
  # error class below is a descendant, so `rescue JWT::DecodeError` keeps its
  # original meaning.
  #
  # @deprecated Use {JWT::Error}, {JWT::TokenError} or a more specific error class instead.
  class DecodeError < Error; end

  # The TokenError class is the base class for all errors related to token processing.
  class TokenError <

... (truncated -- full source via MCP)