Skip to content

Commit b66d99c

Browse files
authored
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
1 parent a9cfc37 commit b66d99c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/labrinth/src/queue/payouts.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,12 @@ impl PayoutsQueue {
193193
pub error_description: String,
194194
}
195195

196-
if let Ok(error) =
196+
if let Ok(mut error) =
197197
serde_json::from_value::<PayPalError>(value.clone())
198198
{
199+
if error.name == "INSUFFICIENT_FUNDS" {
200+
error.message = "We're currently transferring funds to our PayPal account. Please try again in a couple days.".to_string();
201+
}
199202
return Err(ApiError::Payments(format!(
200203
"error name: {}, message: {}",
201204
error.name, error.message

0 commit comments

Comments
 (0)