1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use crate::http::{KnownHeaderName, Method};
/// Http error
#[derive(Debug)]
pub enum HttpError {
/// Generic request error
BadRequest,
/// Invalid HTTP/2 or HTTP/3 header
InvalidHttp2pContent,
/// Missing Header
MissingHeader(
/// Expected header name
KnownHeaderName,
),
/// Received request does not contain a method field
MissingRequestMethod,
/// Received response does not contain a status code field
MissingResponseStatusCode,
/// The URI doesn't have any placeholder
MissingUriPlaceholder,
/// Content-Type mismatch
UnexpectedContentType,
/// HTTP version does not match the expected method.
UnexpectedHttpMethod {
/// Expected method
expected: Method,
},
/// Unknown header name.
UnknownHeaderNameFromBytes {
/// Received length
length: u32,
},
/// Unknown `WebAuthn` Algorithm
UnknownWebAuthnAlg,
/// URI mismatch
UriMismatch,
}