diff options
-rwxr-xr-x | oedquery.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/oedquery.sh b/oedquery.sh index 88a4aae..b01b201 100755 --- a/oedquery.sh +++ b/oedquery.sh @@ -23,6 +23,11 @@ _getdata() { lemmasUrl=https://od-api.oxforddictionaries.com/api/v2/lemmas/$language/$word # get lemmas to link an inflected form back to its headword (required to get definition) result=$(eval curl $OPTS $lemmasUrl) + if [[ "$result" == "Authentication failed" ]] + then + echo "Authentication failed, probably exceeded monthly usage." + exit 0 + fi ret=$? if [ "$ret" -ne 0 ] then |