oven-sh/bun · error · TypeError

INVALID_CALL

INVALID_CALL

Error message

INVALID_CALL

What it means

An invalid function call was made in the certificate verification API. Maps to OpenSSL X509_V_ERR_INVALID_CALL — fires when the verification API is used out of order or with invalid parameters (e.g., verifying before chain building).

Solutions

  1. Check the sequence of verification API calls for correct ordering
  2. Ensure the certificate chain is fully loaded before invoking verification
  3. Review the verification parameter setup for invalid or missing contexts
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/http/error.rs:249 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/d4f08332945f0e2c. Report an issue: GitHub.

Appendix: source

Thrown at src/http/error.rs:249

    #[error("SUITE_B_INVALID_VERSION")]
    SUITE_B_INVALID_VERSION,
    #[error("SUITE_B_INVALID_ALGORITHM")]
    SUITE_B_INVALID_ALGORITHM,
    #[error("SUITE_B_INVALID_CURVE")]
    SUITE_B_INVALID_CURVE,
    #[error("SUITE_B_INVALID_SIGNATURE_ALGORITHM")]
    SUITE_B_INVALID_SIGNATURE_ALGORITHM,
    #[error("SUITE_B_LOS_NOT_ALLOWED")]
    SUITE_B_LOS_NOT_ALLOWED,
    #[error("SUITE_B_CANNOT_SIGN_P_384_WITH_P_256")]
    SUITE_B_CANNOT_SIGN_P_384_WITH_P_256,
    #[error("HOSTNAME_MISMATCH")]
    HOSTNAME_MISMATCH,
    #[error("EMAIL_MISMATCH")]
    EMAIL_MISMATCH,
    #[error("IP_ADDRESS_MISMATCH")]
    IP_ADDRESS_MISMATCH,
    #[error("INVALID_CALL")]
    INVALID_CALL,
    #[error("STORE_LOOKUP")]
    STORE_LOOKUP,
    #[error("NAME_CONSTRAINTS_WITHOUT_SANS")]
    NAME_CONSTRAINTS_WITHOUT_SANS,
    #[error("UNKNOWN_CERTIFICATE_VERIFICATION_ERROR")]
    UNKNOWN_CERTIFICATE_VERIFICATION_ERROR,
}

impl Error {
    #[allow(clippy::trivially_copy_pass_by_ref)]
    pub fn name(&self) -> &'static str {
        match self {
            Self::CompressionFailed => "CompressionFailed",
            Self::Aborted => "Aborted",
            Self::WriteFailed => "WriteFailed",
            Self::HTTP2RefusedStream => "HTTP2RefusedStream",
            Self::HTTP2ContentLengthMismatch => "HTTP2ContentLengthMismatch",

View on GitHub (pinned to 8c5296ac45)