Handle case when wiki has not been found

This commit is contained in:
Frisk 2025-02-16 23:45:05 +01:00
parent f33be9a127
commit 969b7c14ba

View file

@ -174,6 +174,11 @@ class DomainManager:
req_id, json_part) req_id, json_part)
await connection.execute("select pg_notify('debugresponse', 'SITE END ' || $1);", await connection.execute("select pg_notify('debugresponse', 'SITE END ' || $1);",
req_id) req_id)
else:
await connection.execute("select pg_notify('debugresponse', 'SITE CHUNK ' || $1 || ' ' || $2);",
req_id, json.dumps({"error": "Wiki has not been found in running cache. Please make sure you've given appropriate script URL.", "url": "https://frisk.space/imgs/cat.png"}))
await connection.execute("select pg_notify('debugresponse', 'SITE END ' || $1);",
req_id)
else: else:
logger.error("Unknown pub/sub command! Payload: {}".format(payload)) logger.error("Unknown pub/sub command! Payload: {}".format(payload))