[−][src]Enum rocket_cors::Error
Errors during operations
This enum implements rocket::response::Responder
which will return an appropriate status code
while printing out the error in the console.
Because these errors are usually the result of an error while trying to respond to a CORS
request, CORS headers cannot be added to the response and your applications requesting CORS
will not be able to see the status code.
Variants
The HTTP request header Origin
is required but was not provided
BadOrigin(ParseError)
The HTTP request header Origin
could not be parsed correctly.
The configured Allowed Origins are Opaque origins. Use a Regex instead.
The request header Access-Control-Request-Method
is required but is missing
The request header Access-Control-Request-Method
has an invalid value
The request header Access-Control-Request-Headers
is required but is missing.
OriginNotAllowed(String)
Origin is not allowed to make this request
MethodNotAllowed(String)
Requested method is not allowed
A regular expression compilation error
One or more headers requested are not allowed
Credentials are allowed, but the Origin is set to "*". This is not allowed by W3C
This is a misconfiguration. Check the docuemntation for Cors
.
A CORS Request Guard was used, but no CORS Options was available in Rocket's state
This is a misconfiguration. Use Rocket::manage
to add a CORS options to managed state.
The on_response
handler of Fairing could not find the injected header from the Request.
Either some other fairing has removed it, or this is a bug.
Trait Implementations
impl From<ParseError> for Error
[src]
fn from(error: ParseError) -> Self
[src]
impl From<Error> for Error
[src]
impl Display for Error
[src]
impl Debug for Error
[src]
impl Error for Error
[src]
fn cause(&self) -> Option<&dyn Error>
[src]
fn description(&self) -> &str
1.0.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
impl<'r> Responder<'r> for Error
[src]
fn respond_to(self, _: &Request) -> Result<Response<'r>, Status>
[src]
Auto Trait Implementations
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
impl RefUnwindSafe for Error
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,