Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust error message for when mobile confirmation fails #311

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
id: version
attributes:
label: Version
description: What version of steamguard-cli are you running? You can find this by running `steamguard --version`.
description: What version of steamguard-cli are you running? You can find this by running `steamguard --version`. **Do NOT just say "latest", or your issue will be automatically closed.**
validations:
required: true
- type: textarea
Expand Down
8 changes: 5 additions & 3 deletions steamguard/src/confirmation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ where
return Err(ConfirmerError::InvalidTokens);
}
if !body.success {
return Err(anyhow!("Server responded with failure.").into());
return Err(ConfirmerError::RemoteFailure);
}
Ok(body.conf)
}
Expand Down Expand Up @@ -162,7 +162,7 @@ where
return Err(ConfirmerError::InvalidTokens);
}
if !body.success {
return Err(anyhow!("Server responded with failure.").into());
return Err(ConfirmerError::RemoteFailure);
}

Ok(())
Expand Down Expand Up @@ -237,7 +237,7 @@ where
return Err(ConfirmerError::InvalidTokens);
}
if !body.success {
return Err(anyhow!("Server responded with failure.").into());
return Err(ConfirmerError::RemoteFailure);
}

Ok(())
Expand Down Expand Up @@ -316,6 +316,8 @@ pub enum ConfirmerError {
NetworkFailure(#[from] reqwest::Error),
#[error("Failed to deserialize response: {0}")]
DeserializeError(#[from] serde_path_to_error::Error<serde_json::Error>),
#[error("Remote failure: Valve's server responded with a failure. This is likely not a steamguard-cli bug, Steam's confirmation API is just unreliable. Wait a bit and try again.")]
RemoteFailure,
#[error("Unknown error: {0}")]
Unknown(#[from] anyhow::Error),
}
Expand Down
Loading