adjust error message for when mobile confirmation fails (#311)
- adjust error message for when mobile confirmation fails - update issue template
This commit is contained in:
parent
f2821d2837
commit
29aca56067
2 changed files with 6 additions and 4 deletions
2
.github/ISSUE_TEMPLATE/bug.yml
vendored
2
.github/ISSUE_TEMPLATE/bug.yml
vendored
|
@ -10,7 +10,7 @@ body:
|
||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
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:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|
|
@ -109,7 +109,7 @@ where
|
||||||
return Err(ConfirmerError::InvalidTokens);
|
return Err(ConfirmerError::InvalidTokens);
|
||||||
}
|
}
|
||||||
if !body.success {
|
if !body.success {
|
||||||
return Err(anyhow!("Server responded with failure.").into());
|
return Err(ConfirmerError::RemoteFailure);
|
||||||
}
|
}
|
||||||
Ok(body.conf)
|
Ok(body.conf)
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ where
|
||||||
return Err(ConfirmerError::InvalidTokens);
|
return Err(ConfirmerError::InvalidTokens);
|
||||||
}
|
}
|
||||||
if !body.success {
|
if !body.success {
|
||||||
return Err(anyhow!("Server responded with failure.").into());
|
return Err(ConfirmerError::RemoteFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -237,7 +237,7 @@ where
|
||||||
return Err(ConfirmerError::InvalidTokens);
|
return Err(ConfirmerError::InvalidTokens);
|
||||||
}
|
}
|
||||||
if !body.success {
|
if !body.success {
|
||||||
return Err(anyhow!("Server responded with failure.").into());
|
return Err(ConfirmerError::RemoteFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -316,6 +316,8 @@ pub enum ConfirmerError {
|
||||||
NetworkFailure(#[from] reqwest::Error),
|
NetworkFailure(#[from] reqwest::Error),
|
||||||
#[error("Failed to deserialize response: {0}")]
|
#[error("Failed to deserialize response: {0}")]
|
||||||
DeserializeError(#[from] serde_path_to_error::Error<serde_json::Error>),
|
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}")]
|
#[error("Unknown error: {0}")]
|
||||||
Unknown(#[from] anyhow::Error),
|
Unknown(#[from] anyhow::Error),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue