From c98b7f0d5543a28e7bb2e893ffa3087ad4386a05 Mon Sep 17 00:00:00 2001 From: Dan Wolfson Date: Mon, 9 Nov 2026 22:09:35 +0000 Subject: [PATCH] docs: document SearchRefused beside the '*' search refusal and in report-spec errors Signed-off-by: Dan Wolfson --- docs/output-formats-and-report-specs.md | 1 + docs/search-and-get-filters.md | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/output-formats-and-report-specs.md b/docs/output-formats-and-report-specs.md index 62010f65..c2fd7253 100644 --- a/docs/output-formats-and-report-specs.md +++ b/docs/output-formats-and-report-specs.md @@ -1337,6 +1337,7 @@ Read it left to right: *the check* (1, names), *the thing named* (`ServerClient. - `Spec '' cannot run (check N): ...` (in `list_report_specs(with_status=True)`, `unrunnable_specs()` or the log): the spec failed load-time resolution. The check number says what to look at; see [Will this spec run?](#will-this-spec-run-load-time-resolution). For check 1, fix the name (the words say what is missing or which registered name to use); for check 2, add the parameter to the routine's `params` or remove it from the spec; for check 4, correct the column `key` to a field in the routine's `out`; for check 5, declare the routine's `inputs`. A spec with `it has no action` is format-only, not broken. - `RoleRefused`: `Routine '' cannot run: its declared input '' is not supplied (...)`. The environment's supply cannot provide a role the routine declares (plain pyegeria's `PlainSupply` provides the caller's `EgeriaTech` only, no readers, viewer or subject). Run the report spec where its supply provides the role, or pass `exec_report_spec(..., supply=...)` with your own. `NoSuchReader` is the same error for a `reader:` the environment does not hold. - `CallerTokenExpired`: raised by an environment's supply (never by plain pyegeria) when it cannot mint or refresh a client for the caller. Sign in again, or pass a fresh `token`. It is a `RoleRefused`, so `except RoleRefused` catches it too. +- `SearchRefused` (`pyegeria.core.request_filters`, a `ValueError`): a find-method spec asked for `*` with no type, or with a root type (`OpenMetadataRoot`, `Referenceable`). It reads `give a search string or a narrower type`. Nothing is sent to Egeria. Give a search string, or name a narrower type; `*` with a real type is allowed. A refusal reaching `exec_report_spec`'s failure log is logged at WARNING (any other `ValueError` at ERROR), and is raised either way. - A count shows `kind: "absent"` with `Not measured: ...`, or `unmeasured` notes: a count failed, timed out or stopped at its 500-element page cap and was not reported as a total. See [Counts: not measured, and whose population](#counts-not-measured-and-whose-population). - Pydantic validation failures in report execution: these are surfaced with structured validation details (via `print_validation_error`) before being re-raised. Start by checking field names and expected types in the printed validation table. diff --git a/docs/search-and-get-filters.md b/docs/search-and-get-filters.md index 73192b77..45a29b3b 100644 --- a/docs/search-and-get-filters.md +++ b/docs/search-and-get-filters.md @@ -134,7 +134,11 @@ specs: `displayName` and `qualifiedName`) within `metadata_element_type`. - `'*'` with a type lists the elements of that type (it calls `get_elements`), one page at a time: the caller's `page_size`, 100 when none is given, never more than 100 per call — page on with `start_from`. `'*'` with no type, or with a root type (`OpenMetadataRoot`, - `Referenceable`), is refused: "give a search string or a narrower type". + `Referenceable`), is refused: "give a search string or a narrower type". The refusal is + `pyegeria.core.request_filters.SearchRefused`, a `ValueError` subclass, raised before any request + is sent to Egeria (`find_elements_by_property_value` and `find_metadata_elements_with_string` + raise it), so `except ValueError` still catches it. A report spec run that hits it logs a + warning rather than an error. - `deployed_implementation_type="PostgreSQL Server"` restricts the search to exactly that technology within the type. Egeria evaluates it in one complex query: `deployedImplementationType` **equals** the technology (ignoring case, so `"postgresql server"` works), **and**, for a search string other than