Catch nil on error

This commit is contained in:
Ben Adrian Sarmiento
2024-06-28 19:55:15 +02:00
parent 67111696a2
commit f8f31b3b67

View File

@@ -10,5 +10,5 @@ func IsBytesLimitReached(err error) bool {
}
func AreAllTokensExpired(err error) bool {
return err.Error() == "all tokens are expired"
return err != nil && err.Error() == "all tokens are expired"
}