oven-sh/bun · error · TypeError

UNKNOWN_CERTIFICATE_VERIFICATION_ERROR

UNKNOWN_CERTIFICATE_VERIFICATION_ERROR

Error message

UNKNOWN_CERTIFICATE_VERIFICATION_ERROR

What it means

BoringSSL certificate-verification catch-all: the verification callback returned a status code the error table doesn't recognize, so the failure can't be classified into a specific reason. Treat as "certificate invalid for an unknown reason".

Solutions

  1. Inspect the underlying TLS library error code for the actual failure reason
  2. Enable TLS debugging to capture the raw verification error
  3. Report unmapped verification codes to have them added to the enum
Defensive patterns

Strategy: try-catch

When it happens

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

Common situations: See trigger scenarios.

Understand the failure class


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

Appendix: source

Thrown at src/http/error.rs:255

    #[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",
            Self::HTTP2FrameSizeError => "HTTP2FrameSizeError",
            Self::HTTP2ProtocolError => "HTTP2ProtocolError",
            Self::HTTP2FlowControlError => "HTTP2FlowControlError",
            Self::HTTP2EnhanceYourCalm => "HTTP2EnhanceYourCalm",
            Self::HTTP2HeaderListTooLarge => "HTTP2HeaderListTooLarge",
            Self::HTTP2StreamReset => "HTTP2StreamReset",

View on GitHub (pinned to 8c5296ac45)