Skip to content

Commit 80c8514

Browse files
authored
Permit missing gater config (#145)
Tone done errors from when `alligater` is not configured. This is expected in the default configuration. Reserve error logging for true connectivity errors, tone done missing config to a debug-level log.
1 parent eac086d commit 80c8514

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/server/features.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ def _load_config_from_db() -> str:
108108

109109
with session.begin() as tx:
110110
try:
111-
gater = tx.query(Gater).where(Gater.active).one()
111+
gater = tx.query(Gater).where(Gater.active).one_or_none()
112+
if not gater:
113+
logger.debug(
114+
"No active alligater config found in database, using empty"
115+
)
116+
return ""
112117
return gater.blob
113118
except Exception as e:
114119
logger.error(f"Failed to fetch alligater config: {e}")

0 commit comments

Comments
 (0)