Unwrap a RunView result, throwing with the provider's own error text when the query failed.
RunView does not throw — it returns Success: false plus an ErrorMessage. Coalescing that to
[] makes a broken query indistinguishable from "no rows", which is exactly how a filter on a
column that does not exist (AIPromptRun.AgentRunID) survived in this file: every caller read
zero prompt runs and either passed vacuously or failed on an unrelated-looking assertion. A
check that cannot read its observables must fail loudly, naming the query that broke.
Unwrap a RunView result, throwing with the provider's own error text when the query failed.
RunView does not throw — it returns
Success: falseplus an ErrorMessage. Coalescing that to[]makes a broken query indistinguishable from "no rows", which is exactly how a filter on a column that does not exist (AIPromptRun.AgentRunID) survived in this file: every caller read zero prompt runs and either passed vacuously or failed on an unrelated-looking assertion. A check that cannot read its observables must fail loudly, naming the query that broke.