diff --git a/src/commands/account/create_account/sponsor_by_faucet_service/mod.rs b/src/commands/account/create_account/sponsor_by_faucet_service/mod.rs index 5fe4a7a93..2449da275 100644 --- a/src/commands/account/create_account/sponsor_by_faucet_service/mod.rs +++ b/src/commands/account/create_account/sponsor_by_faucet_service/mod.rs @@ -51,6 +51,13 @@ impl NewAccountContext { let client = reqwest::blocking::Client::new(); match client.post(faucet_service_url.clone()).json(&data).send() { Ok(response) => { + if response.status() >= reqwest::StatusCode::BAD_REQUEST { + return Err(color_eyre::Report::msg(format!( + "The faucet (helper service) server failed with status code <{}>", + response.status() + ))); + } + let account_creation_transaction = response .json::( )?;