// Copyright 2023 Salesforce, Inc. All rights reserved.

#[derive(Debug, thiserror::Error)]
pub enum CorsError {
    #[error("Unable to find a valid method for current request.")]
    RequestMethodNotFound,

    #[error("Incoming request Origin does not match with any allowed Origin.")]
    OriginsDoesNotMatch,

    #[error("CORS Headers not allowed in incoming request")]
    HeaderNotAllowed,

    #[error("CORS Method not allowed in incoming request")]
    MethodNotAllowed,
}
