@@ -15,143 +15,143 @@ macro_rules! bail {
15
15
}
16
16
17
17
// 4xx
18
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::BAD_REQUEST`] from a string or existing non-anyhow error value.
18
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::BAD_REQUEST`] from a string or existing non-anyhow error value.
19
19
#[ macro_export]
20
20
macro_rules! http_error_bad_request {
21
21
( $( $arg: tt) * ) => { {
22
22
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: BAD_REQUEST )
23
23
} }
24
24
}
25
25
26
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::UNAUTHORIZED`] from a string or existing non-anyhow error value.
26
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::UNAUTHORIZED`] from a string or existing non-anyhow error value.
27
27
#[ macro_export]
28
28
macro_rules! http_error_unauthorized {
29
29
( $( $arg: tt) * ) => { {
30
30
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: UNAUTHORIZED )
31
31
} }
32
32
}
33
33
34
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::PAYMENT_REQUIRED`] from a string or existing non-anyhow error value.
34
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::PAYMENT_REQUIRED`] from a string or existing non-anyhow error value.
35
35
#[ macro_export]
36
36
macro_rules! http_error_payment_required {
37
37
( $( $arg: tt) * ) => { {
38
38
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: PAYMENT_REQUIRED )
39
39
} }
40
40
}
41
41
42
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::FORBIDDEN`] from a string or existing non-anyhow error value.
42
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::FORBIDDEN`] from a string or existing non-anyhow error value.
43
43
#[ macro_export]
44
44
macro_rules! http_error_forbidden {
45
45
( $( $arg: tt) * ) => { {
46
46
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: FORBIDDEN )
47
47
} }
48
48
}
49
49
50
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::NOT_FOUND`] from a string or existing non-anyhow error value.
50
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::NOT_FOUND`] from a string or existing non-anyhow error value.
51
51
#[ macro_export]
52
52
macro_rules! http_error_not_found {
53
53
( $( $arg: tt) * ) => { {
54
54
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: NOT_FOUND )
55
55
} }
56
56
}
57
57
58
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::METHOD_NOT_ALLOWED`] from a string or existing non-anyhow error value.
58
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::METHOD_NOT_ALLOWED`] from a string or existing non-anyhow error value.
59
59
#[ macro_export]
60
60
macro_rules! http_error_method_not_allowed {
61
61
( $( $arg: tt) * ) => { {
62
62
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: METHOD_NOT_ALLOWED )
63
63
} }
64
64
}
65
65
66
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::NOT_ACCEPTABLE`] from a string or existing non-anyhow error value.
66
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::NOT_ACCEPTABLE`] from a string or existing non-anyhow error value.
67
67
#[ macro_export]
68
68
macro_rules! http_error_not_acceptable {
69
69
( $( $arg: tt) * ) => { {
70
70
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: NOT_ACCEPTABLE )
71
71
} }
72
72
}
73
73
74
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::PROXY_AUTHENTICATION_REQUIRED`] from a string or existing non-anyhow error value.
74
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::PROXY_AUTHENTICATION_REQUIRED`] from a string or existing non-anyhow error value.
75
75
#[ macro_export]
76
76
macro_rules! http_error_proxy_authentication_required {
77
77
( $( $arg: tt) * ) => { {
78
78
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: PROXY_AUTHENTICATION_REQUIRED )
79
79
} }
80
80
}
81
81
82
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::REQUEST_TIMEOUT`] from a string or existing non-anyhow error value.
82
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::REQUEST_TIMEOUT`] from a string or existing non-anyhow error value.
83
83
#[ macro_export]
84
84
macro_rules! http_error_request_timeout {
85
85
( $( $arg: tt) * ) => { {
86
86
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: REQUEST_TIMEOUT )
87
87
} }
88
88
}
89
89
90
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::CONFLICT`] from a string or existing non-anyhow error value.
90
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::CONFLICT`] from a string or existing non-anyhow error value.
91
91
#[ macro_export]
92
92
macro_rules! http_error_conflict {
93
93
( $( $arg: tt) * ) => { {
94
94
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: CONFLICT )
95
95
} }
96
96
}
97
97
98
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::GONE`] from a string or existing non-anyhow error value.
98
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::GONE`] from a string or existing non-anyhow error value.
99
99
#[ macro_export]
100
100
macro_rules! http_error_gone {
101
101
( $( $arg: tt) * ) => { {
102
102
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: GONE )
103
103
} }
104
104
}
105
105
106
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::LENGTH_REQUIRED`] from a string or existing non-anyhow error value.
106
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::LENGTH_REQUIRED`] from a string or existing non-anyhow error value.
107
107
#[ macro_export]
108
108
macro_rules! http_error_length_required {
109
109
( $( $arg: tt) * ) => { {
110
110
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: LENGTH_REQUIRED )
111
111
} }
112
112
}
113
113
114
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::PRECONDITION_FAILED`] from a string or existing non-anyhow error value.
114
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::PRECONDITION_FAILED`] from a string or existing non-anyhow error value.
115
115
#[ macro_export]
116
116
macro_rules! http_error_precondition_failed {
117
117
( $( $arg: tt) * ) => { {
118
118
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: PRECONDITION_FAILED )
119
119
} }
120
120
}
121
121
122
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::PAYLOAD_TOO_LARGE`] from a string or existing non-anyhow error value.
122
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::PAYLOAD_TOO_LARGE`] from a string or existing non-anyhow error value.
123
123
#[ macro_export]
124
124
macro_rules! http_error_payload_too_large {
125
125
( $( $arg: tt) * ) => { {
126
126
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: PAYLOAD_TOO_LARGE )
127
127
} }
128
128
}
129
129
130
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::URI_TOO_LONG`] from a string or existing non-anyhow error value.
130
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::URI_TOO_LONG`] from a string or existing non-anyhow error value.
131
131
#[ macro_export]
132
132
macro_rules! http_error_uri_too_long {
133
133
( $( $arg: tt) * ) => { {
134
134
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: URI_TOO_LONG )
135
135
} }
136
136
}
137
137
138
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::UNSUPPORTED_MEDIA_TYPE`] from a string or existing non-anyhow error value.
138
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::UNSUPPORTED_MEDIA_TYPE`] from a string or existing non-anyhow error value.
139
139
#[ macro_export]
140
140
macro_rules! http_error_unsupported_media_type {
141
141
( $( $arg: tt) * ) => { {
142
142
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: UNSUPPORTED_MEDIA_TYPE )
143
143
} }
144
144
}
145
145
146
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::RANGE_NOT_SATISFIABLE`] from a string or existing non-anyhow error value.
146
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::RANGE_NOT_SATISFIABLE`] from a string or existing non-anyhow error value.
147
147
#[ macro_export]
148
148
macro_rules! http_error_range_not_satisfiable {
149
149
( $( $arg: tt) * ) => { {
150
150
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: RANGE_NOT_SATISFIABLE )
151
151
} }
152
152
}
153
153
154
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::EXPECTATION_FAILED`] from a string or existing non-anyhow error value.
154
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::EXPECTATION_FAILED`] from a string or existing non-anyhow error value.
155
155
#[ macro_export]
156
156
macro_rules! http_error_expectation_failed {
157
157
( $( $arg: tt) * ) => { {
@@ -160,71 +160,71 @@ macro_rules! http_error_expectation_failed {
160
160
}
161
161
162
162
// 50x
163
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::INTERNAL_SERVER_ERROR`] from a string or existing non-anyhow error value.
163
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::INTERNAL_SERVER_ERROR`] from a string or existing non-anyhow error value.
164
164
#[ macro_export]
165
165
macro_rules! http_error_internal_server_error {
166
166
( $( $arg: tt) * ) => { {
167
167
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: INTERNAL_SERVER_ERROR )
168
168
} }
169
169
}
170
170
171
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::NOT_IMPLEMENTED`] from a string or existing non-anyhow error value.
171
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::NOT_IMPLEMENTED`] from a string or existing non-anyhow error value.
172
172
#[ macro_export]
173
173
macro_rules! http_error_not_implemented {
174
174
( $( $arg: tt) * ) => { {
175
175
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: NOT_IMPLEMENTED )
176
176
} }
177
177
}
178
178
179
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::BAD_GATEWAY`] from a string or existing non-anyhow error value.
179
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::BAD_GATEWAY`] from a string or existing non-anyhow error value.
180
180
#[ macro_export]
181
181
macro_rules! http_error_bad_gateway {
182
182
( $( $arg: tt) * ) => { {
183
183
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: BAD_GATEWAY )
184
184
} }
185
185
}
186
186
187
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::SERVICE_UNAVAILABLE`] from a string or existing non-anyhow error value.
187
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::SERVICE_UNAVAILABLE`] from a string or existing non-anyhow error value.
188
188
#[ macro_export]
189
189
macro_rules! http_error_service_unavailable {
190
190
( $( $arg: tt) * ) => { {
191
191
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: SERVICE_UNAVAILABLE )
192
192
} }
193
193
}
194
194
195
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::GATEWAY_TIMEOUT`] from a string or existing non-anyhow error value.
195
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::GATEWAY_TIMEOUT`] from a string or existing non-anyhow error value.
196
196
#[ macro_export]
197
197
macro_rules! http_error_gateway_timeout {
198
198
( $( $arg: tt) * ) => { {
199
199
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: GATEWAY_TIMEOUT )
200
200
} }
201
201
}
202
202
203
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::HTTP_VERSION_NOT_SUPPORTED`] from a string or existing non-anyhow error value.
203
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::HTTP_VERSION_NOT_SUPPORTED`] from a string or existing non-anyhow error value.
204
204
#[ macro_export]
205
205
macro_rules! http_error_http_version_not_supported {
206
206
( $( $arg: tt) * ) => { {
207
207
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: HTTP_VERSION_NOT_SUPPORTED )
208
208
} }
209
209
}
210
210
211
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::VARIANT_ALSO_NEGOTIATES`] from a string or existing non-anyhow error value.
211
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::VARIANT_ALSO_NEGOTIATES`] from a string or existing non-anyhow error value.
212
212
#[ macro_export]
213
213
macro_rules! http_error_variant_also_negotiates {
214
214
( $( $arg: tt) * ) => { {
215
215
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: VARIANT_ALSO_NEGOTIATES )
216
216
} }
217
217
}
218
218
219
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::INSUFFICIENT_STORAGE`] from a string or existing non-anyhow error value.
219
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::INSUFFICIENT_STORAGE`] from a string or existing non-anyhow error value.
220
220
#[ macro_export]
221
221
macro_rules! http_error_insufficient_storage {
222
222
( $( $arg: tt) * ) => { {
223
223
$crate:: error!( $( $arg) * ) . with_status( StatusCode :: INSUFFICIENT_STORAGE )
224
224
} }
225
225
}
226
226
227
- /// Constructs an [`Error`][`super::Error`] with [`http ::StatusCode::LOOP_DETECTED`] from a string or existing non-anyhow error value.
227
+ /// Constructs an [`Error`][`super::Error`] with [`hyper ::StatusCode::LOOP_DETECTED`] from a string or existing non-anyhow error value.
228
228
#[ macro_export]
229
229
macro_rules! http_error_loop_detected {
230
230
( $( $arg: tt) * ) => { {
0 commit comments