Improve error when Modrinth's PayPal account is out of funds (#3718)
* Improve error when Modrinth's PayPal account is out of funds * improve msg
This commit is contained in:
parent
a9cfc37aac
commit
b66d99c59c
@ -193,9 +193,12 @@ impl PayoutsQueue {
|
||||
pub error_description: String,
|
||||
}
|
||||
|
||||
if let Ok(error) =
|
||||
if let Ok(mut error) =
|
||||
serde_json::from_value::<PayPalError>(value.clone())
|
||||
{
|
||||
if error.name == "INSUFFICIENT_FUNDS" {
|
||||
error.message = "We're currently transferring funds to our PayPal account. Please try again in a couple days.".to_string();
|
||||
}
|
||||
return Err(ApiError::Payments(format!(
|
||||
"error name: {}, message: {}",
|
||||
error.name, error.message
|
||||
|
Loading…
x
Reference in New Issue
Block a user