mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +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}"
|
return "${__BASHIO_EXIT_NOK}"
|
||||||
fi
|
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
|
if [[ "${status}" -eq 404 ]]; then
|
||||||
bashio::log.error "Requested resource ${resource} was not found"
|
bashio::log.error "Requested resource ${resource} was not found"
|
||||||
return "${__BASHIO_EXIT_NOK}"
|
return "${__BASHIO_EXIT_NOK}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue