diff --git a/src/commands/guild.rs b/src/commands/guild.rs index 6d8fff2..031f1cc 100644 --- a/src/commands/guild.rs +++ b/src/commands/guild.rs @@ -38,7 +38,9 @@ pub fn wc_guild(command: &str, msg: &Message) -> Result<(), Error> { } let message = (|| { - let resp = reqwest::get("https://api.wynncraft.com/public_api.php?action=territoryList")?.text()?; + let resp = reqwest::get("https://api.wynncraft.com/public_api.php?action=territoryList")? + .error_for_status()? + .text()?; let territories: Value = if let Ok(error) = serde_json::from_str::(&resp) { bail!("API error ({})", error.error);