Add error message for 403 error on API access (#139)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Dave T 2023-10-22 16:01:30 +01:00 committed by GitHub
parent 30897c753a
commit 2f86c63e60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,11 @@ function bashio::api.supervisor() {
return "${__BASHIO_EXIT_NOK}"
fi
if [[ "${status}" -eq 403 ]]; then
bashio::log.error "Unable to access the API, forbidden"
return "${__BASHIO_EXIT_NOK}"
fi
if [[ "${status}" -eq 404 ]]; then
bashio::log.error "Requested resource ${resource} was not found"
return "${__BASHIO_EXIT_NOK}"