Add view name to queryUI error

This commit is contained in:
Andrew Kingston 2024-10-23 14:50:46 +01:00
parent ad475be4f7
commit 4eda072af4
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export function ensureQueryUISet(viewArg: Readonly<ViewV2>): ViewV2 {
// So despite the type saying that `view.query` is a LegacyFilter[] |
// SearchFilters, it will never be a SearchFilters when a `view.queryUI`
// is specified, making it "safe" to throw an error here.
throw new HTTPError("view is missing queryUI field", 400)
throw new HTTPError(`View ${view.name} is missing queryUI field`, 400)
}
view.queryUI = utils.processSearchFilters(view.query)