From 7f5d67ba742ca8deaa1ed9ae185c1467ccbb51f7 Mon Sep 17 00:00:00 2001 From: Koen Bolhuis Date: Wed, 13 Jan 2021 13:05:50 +0100 Subject: [PATCH] Document Error::ApiError fields --- src/error.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index cd9366b..45a3c9f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,7 +7,13 @@ use serde::Deserialize; pub enum Error { /// The API returned a non-200 status code. #[error("API error ({code}): {error}")] - Api { code: u16, error: String }, + Api { + /// The HTTP status code. + code: u16, + + /// A message describing the error. + error: String + }, /// The input data could not be converted into JSON. #[error("could not convert request input into JSON")]