chesscom/error.rs
1// Api Error type encapsulating HTTP status and the JSON error response
2pub use chesscom_openapi::apis::default_api::ApiError;
3
4// Error type that wraps any error the client can throw, e.g. api errors, http errors, etc...
5pub type Error = chesscom_openapi::apis::Error<ApiError>;
6
7// Represents the JSON error response from the API
8pub type ErrorResponse = chesscom_openapi::models::error::Error;
9
10// Convenience
11pub type Result<T> = std::result::Result<T, Error>;