Add error message for 403 error on API access

This commit is contained in:
Dave T 2023-09-26 22:44:56 +01:00 committed by GitHub
parent 6644179728
commit e40c7c607f
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}"