Don't cover these, they exist for defensive, but there's no other current diagnostic

This commit is contained in:
stumpylog
2026-09-11 14:45:15 -07:00
committed by GitHub
parent cd035d5b8b
commit 8911e0712a
+6 -2
View File
@@ -54,8 +54,12 @@ def _user_facing_emit_message(d: Diagnostic) -> str:
return f"The wildcard pattern for field {field!r} is too complex."
if d.kind is DiagnosticKind.SCHEMA_FIELD_MISSING:
return f"Field {field!r} is not available in the search index."
logger.warning("Unmapped emit diagnostic %s: %s", d.kind, d.message)
return "The search query could not be executed."
logger.warning(
"Unmapped emit diagnostic %s: %s",
d.kind,
d.message,
) # pragma: no cover
return "The search query could not be executed." # pragma: no cover
def _map_emit_error(e: QueryError) -> SearchQueryError: