use alloc::string::String;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("found an unprotected header parameter, that must be proctected")]
ExpectedProtected,
#[error("the protected and unprotected header parameters share members with the same name")]
NotDisjoint,
#[error("both the protected and unprotected header parameters are empty")]
NoHeader,
#[error("the protected or the unprotected header parameter is empty")]
EmptyHeader,
#[error("found a forbidden header parameter: {0}")]
ForbiddenHeader(String),
#[error("a required header is missing: {0}")]
MissingHeader(String),
#[error("the crit header is empty")]
EmptyCriticalHeaders,
#[error(transparent)]
JsonError(#[from] serde_json::Error),
}