Update error documentation (#121)

* Update error documentation

* Update docs/progenitor-client.md

Co-authored-by: Adam Leventhal <adam.leventhal@gmail.com>

Co-authored-by: Adam Leventhal <adam.leventhal@gmail.com>
This commit is contained in:
Karen Cárcamo 2022-07-14 18:07:49 +12:00 committed by GitHub
parent 3c8c51260d
commit 8964ace0ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions

View File

@ -62,7 +62,10 @@ It can be used as the type `T` in most instances and extracted as a `T` using
## `Error<E>`
There are four sub-categories of error covered by the error type variants:
There are five sub-categories of error covered by the error type variants:
- A request that did not conform to API requirements. This can occur when required builder or body parameters were not specified, and the error message will denote the specific failure.
- A communication error
- An expected error response, defined by the OpenAPI document with a 4xx or 5xx
@ -78,7 +81,8 @@ error status codes
These errors are covered by the variants of the `Error<E>` type:
```rust
pub enum Error<E> {
pub enum Error<E = ()> {
InvalidRequest(String),
CommunicationError(reqwest::Error),
ErrorResponse(ResponseValue<E>),
InvalidResponsePayload(reqwest::Error),