new: add network is down

This commit is contained in:
upong 2023-04-04 11:15:16 +02:00
parent b9af0a4270
commit 3aeea260aa

View File

@ -61,9 +61,12 @@ func run(w string) {
} }
log.Info().Str("wallet", w).Msg("Claim successful!") log.Info().Str("wallet", w).Msg("Claim successful!")
} else { } else {
if string(body) == "error code: 1015" { switch {
case string(body) == "error code: 1015":
log.Info().Str("wallet", w).Msg("Claim already made!") log.Info().Str("wallet", w).Msg("Claim already made!")
} else { case string(body) == "error code: 1020":
log.Warn().Str("wallet", w).Msg("Network is down")
default:
log.Error().Str("wallet", w).Msg(string(body)) log.Error().Str("wallet", w).Msg(string(body))
} }
} }