Commit d95baea
authored
Improve error handling and move from MeiliSearch 0.11 to MeiliSearch 0.12 errors. (#36)
* Implement error code handling for Meilisearch 0.12
* Add additional errors, refactor error type
* Extend MeiliSearch 0.12 error handling, remove support for 0.11
* Add documentation and make some formatting changes
* Move ErrorCode::Unknown inner value to opaque type
This ensures that adding new error types will not be a breaking
change, as unknown error codes cannot be matched on. It is still
possible to retrieve the inner value of the unknown error code by
using the `Display` implementation or the `as_str` method, but
those are much less likely to be used and should not be expected
to be stable.1 parent 44ac655 commit d95baea
4 files changed
+332
-69
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| |||
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | | - | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | | - | |
207 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
| |||
234 | 239 | | |
235 | 240 | | |
236 | 241 | | |
237 | | - | |
| 242 | + | |
| 243 | + | |
238 | 244 | | |
239 | | - | |
240 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
241 | 249 | | |
242 | 250 | | |
243 | 251 | | |
| |||
0 commit comments