fix: Use CloudApiKeyMissingError for local mode consistency
Signed-off-by: Nikoloz Turazashvili <turazashvili@gmail.com>
This commit is contained in:
parent
1fc8e5ad08
commit
2651b34e41
1 changed files with 2 additions and 8 deletions
|
|
@ -16,14 +16,8 @@ def get_checks_router():
|
|||
api_token = request.headers.get("X-Api-Key")
|
||||
|
||||
if api_token is None:
|
||||
# Return a graceful response for local/self-hosted installations
|
||||
return {
|
||||
"status": "local_mode",
|
||||
"message": "Running in local mode. Cloud features are not available without API key.",
|
||||
"cloud_available": False,
|
||||
"local_mode": True,
|
||||
}
|
||||
raise CloudApiKeyMissingError()
|
||||
|
||||
return await check_api_key(api_token)
|
||||
|
||||
return router
|
||||
return router
|
||||
Loading…
Add table
Reference in a new issue