Skip to content

Commit b639847

Browse files
committed
Improve error messaging; fix pub char info
1 parent 5db7489 commit b639847

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rfesi"
3-
version = "0.16.0"
3+
version = "0.16.1"
44
authors = ["Celeo <[email protected]>"]
55
edition = "2021"
66
description = "Rust API for EVE Online's ESI"

src/client.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ impl Esi {
421421
);
422422
return Err(EsiError::InvalidStatusCode(resp.status().as_u16()));
423423
}
424-
let data: T = resp.json().await?;
424+
let text = resp.text().await?;
425+
let data: T = serde_json::from_str(&text)?;
425426
Ok(data)
426427
}
427428

src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub enum EsiError {
4646
#[error("Error occurred while parsing the Swagger spec at: {0}")]
4747
FailedSpecParse(String),
4848
/// Error for being unable to parse JSON from anywhere.
49-
#[error("Failed to serialize/deserialize JSON")]
49+
#[error("Failed to serialize/deserialize JSON; this may be due to unexpected data or invalid struct field(s)")]
5050
FailedJsonParse(#[from] serde_json::Error),
5151
/// Error for being unable to get the current timestamp.
5252
#[error("Could not get current timestamp: {0}")]

src/groups/character.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub struct CharacterGroup<'a> {
99
#[allow(missing_docs)]
1010
pub struct CharacterPublicInfo {
1111
pub alliance_id: u64,
12-
pub ancestry_id: u16,
1312
pub birthday: String,
13+
pub bloodline_id: u64,
1414
pub corporation_id: u64,
1515
pub description: String,
1616
pub gender: String,

0 commit comments

Comments
 (0)