mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-03 18:41:31 +00:00
Add error message for 403 error on API access (#139)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
30897c753a
commit
2f86c63e60
1 changed files with 5 additions and 0 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue