use axum_core::extract::rejection::BytesRejection;
use crate::macros::{
__composite_rejection as composite_rejection, __define_rejection as define_rejection,
};
define_rejection! {
#[status = BAD_REQUEST]
#[body = "Failed to deserialize the YAML body into the target type"]
pub struct YamlError(Error);
}
define_rejection! {
#[status = UNSUPPORTED_MEDIA_TYPE]
#[body = "Expected request with `Content-Type: application/yaml`"]
pub struct MissingYamlContentType;
}
composite_rejection! {
pub enum YamlRejection {
YamlError,
MissingYamlContentType,
BytesRejection,
}
}