From 8b32ae8b3a66f15cad69d7e974d2c9982541ebb6 Mon Sep 17 00:00:00 2001 From: Asa Venton Date: Tue, 17 May 2022 18:58:23 +0100 Subject: Add output to alert user to exceeded OED API usage limit. --- oedquery.sh | 5 +++++ 1 file changed, 5 insertions(+) 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)) } -- cgit v1.2.3