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:
parent
3c8c51260d
commit
8964ace0ac
|
@ -62,7 +62,10 @@ It can be used as the type `T` in most instances and extracted as a `T` using
|
||||||
|
|
||||||
## `Error<E>`
|
## `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
|
- A communication error
|
||||||
|
|
||||||
- An expected error response, defined by the OpenAPI document with a 4xx or 5xx
|
- 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:
|
These errors are covered by the variants of the `Error<E>` type:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
pub enum Error<E> {
|
pub enum Error<E = ()> {
|
||||||
|
InvalidRequest(String),
|
||||||
CommunicationError(reqwest::Error),
|
CommunicationError(reqwest::Error),
|
||||||
ErrorResponse(ResponseValue<E>),
|
ErrorResponse(ResponseValue<E>),
|
||||||
InvalidResponsePayload(reqwest::Error),
|
InvalidResponsePayload(reqwest::Error),
|
||||||
|
|
Loading…
Reference in New Issue