1use std::io;
2
3use ringline_h2::H2Error;
4
5#[derive(Debug, thiserror::Error)]
7pub enum HttpError {
8 #[error("connection closed")]
10 ConnectionClosed,
11
12 #[error("h2 error: {0}")]
14 H2(#[from] H2Error),
15
16 #[error("io error: {0}")]
18 Io(#[from] io::Error),
19
20 #[error("invalid url: {0}")]
22 InvalidUrl(String),
23
24 #[error("parse error")]
26 Parse,
27
28 #[error("timeout")]
30 Timeout,
31
32 #[error("flow control error")]
34 FlowControl,
35
36 #[error("all connections failed")]
38 AllConnectionsFailed,
39
40 #[error("protocol error: {0}")]
42 Protocol(String),
43
44 #[error("decompression error: {0}")]
46 Decompress(String),
47}