Fields in Error related structs are now accessible

Fixes #239
This commit is contained in:
Sebastian Thiel
2019-09-09 08:12:17 +02:00
parent 3c1e509a25
commit bcc72e4fc1

View File

@@ -70,24 +70,24 @@ pub struct JsonServerError {
/// The latter happen if the sent parameters or request structures are unsound
#[derive(Deserialize, Serialize, Debug)]
pub struct ErrorResponse {
error: ServerError,
pub error: ServerError,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct ServerError {
errors: Vec<ServerMessage>,
code: u16,
message: String,
pub errors: Vec<ServerMessage>,
pub code: u16,
pub message: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct ServerMessage {
domain: String,
reason: String,
message: String,
pub domain: String,
pub reason: String,
pub message: String,
#[serde(rename="locationType")]
location_type: Option<String>,
location: Option<String>
pub location_type: Option<String>,
pub location: Option<String>
}
#[derive(Copy, Clone)]