summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsa Venton <asav1410@gmail.com>2022-05-17 18:58:23 +0100
committerAsa Venton <asav1410@gmail.com>2022-05-17 18:58:23 +0100
commit8b32ae8b3a66f15cad69d7e974d2c9982541ebb6 (patch)
tree6801a5c37cbda72530b122e019d99879e06e36eb
parent255a15a568003eeff6c33dccc7c40784f146af46 (diff)
Add output to alert user to exceeded OED API usage limit.
-rwxr-xr-xoedquery.sh5
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))
}