Skip to content

Commit 2f86c63

Browse files
davet2001frenck
andauthored
Add error message for 403 error on API access (#139)
Co-authored-by: Franck Nijhof <git@frenck.dev>
1 parent 30897c7 commit 2f86c63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/api.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ function bashio::api.supervisor() {
6464
return "${__BASHIO_EXIT_NOK}"
6565
fi
6666

67+
if [[ "${status}" -eq 403 ]]; then
68+
bashio::log.error "Unable to access the API, forbidden"
69+
return "${__BASHIO_EXIT_NOK}"
70+
fi
71+
6772
if [[ "${status}" -eq 404 ]]; then
6873
bashio::log.error "Requested resource ${resource} was not found"
6974
return "${__BASHIO_EXIT_NOK}"

0 commit comments

Comments
 (0)