You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contrib/signet/getcoins.py
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,4 +48,15 @@
48
48
except:
49
49
print('Unexpected error when contacting faucet:', sys.exc_info()[0])
50
50
exit()
51
-
print(res.text)
51
+
52
+
# Display the output as per the returned status code
53
+
ifres:
54
+
# When the return code is in between 200 and 400 i.e. successful
55
+
print(res.text)
56
+
elifres.status_code==404:
57
+
print('The specified faucet URL does not exist. Please check for any server issues/typo.')
58
+
elifres.status_code==429:
59
+
print('The script does not allow for repeated transactions as the global faucet is rate-limitied to 1 request/IP/day. You can access the faucet website to get more coins manually')
0 commit comments