APIForbidden should result in 403 status (#4943)

This commit is contained in:
Mike Degatano
2024-03-04 11:09:17 -05:00
committed by GitHub
parent bb5e138134
commit 2c7b417e25
3 changed files with 11 additions and 4 deletions

View File

@@ -308,6 +308,8 @@ class HostLogError(HostError):
class APIError(HassioError, RuntimeError):
"""API errors."""
status = 400
def __init__(
self,
message: str | None = None,
@@ -322,6 +324,8 @@ class APIError(HassioError, RuntimeError):
class APIForbidden(APIError):
"""API forbidden error."""
status = 403
class APIAddonNotInstalled(APIError):
"""Not installed addon requested at addons API."""