diff options
author | Asa Venton <asav1410@gmail.com> | 2022-05-17 18:58:23 +0100 |
---|---|---|
committer | Asa Venton <asav1410@gmail.com> | 2022-05-17 18:58:23 +0100 |
commit | 8b32ae8b3a66f15cad69d7e974d2c9982541ebb6 (patch) | |
tree | 6801a5c37cbda72530b122e019d99879e06e36eb | |
parent | 255a15a568003eeff6c33dccc7c40784f146af46 (diff) |
Add output to alert user to exceeded OED API usage limit.
-rwxr-xr-x | oedquery.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/oedquery.sh b/oedquery.sh index 5c90ec4..322e908 100755 --- a/oedquery.sh +++ b/oedquery.sh @@ -25,6 +25,11 @@ _curl() { echo "Authentication failed, probably exceeded monthly usage." exit 0 fi + if [[ "$result" == "Usage limit exceeded. Please, review your plan and minute rate limits." ]] + then + echo "Usage limit exceeded. Tell ars to fix." + exit 0 + fi ((curlCount=curlCount+1)) } |