{"record":{"id":"a9477f3fce1678db","repo":"koala73/worldmonitor","slug":"query-must-not-be-empty","errorCode":null,"errorMessage":"query must not be empty.","messagePattern":"query must not be empty\\.","errorType":"validation","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":2550,"sourceCode":"      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.setTimeRange, async (args, extra) => (\n        applyDashboardAction({\n          type: 'set_time_range',\n          timeRange: args.timeRange,\n        }, app, extra)\n      ), trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.focusCountry,\n      title: 'Focus Country On Map',\n      description:\n        'Focus the visible map on a country bounding box by ISO 3166-1 alpha-2 code without opening a country brief or consuming briefing quota.',\n      inputSchema: {\n        type: 'object',\n        properties: {\n          iso2: {\n            type: 'string',\n            description: 'ISO 3166-1 alpha-2 country code, uppercase.',\n            pattern: DASHBOARD_COUNTRY_CODE_PATTERN,\n          },\n        },\n        required: ['iso2'],\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.focusCountry, async (args, extra) => {\n        const iso2 = typeof args.iso2 === 'string' ? args.iso2.toUpperCase() : '';\n        if (!ISO2.test(iso2)) {\n          throw new SafeWebMcpError(\n            'iso2 must be an ISO 3166-1 alpha-2 code, such as \"DE\" or \"IR\".',\n            'validation',\n          );\n        }\n        return applyDashboardAction({\n          type: 'focus_country',\n          iso2,","sourceCodeStart":2532,"sourceCodeEnd":2568,"githubUrl":"https://github.com/koala73/worldmonitor/blob/e586b8b4b80f595aa7ece295eec10d76f2921240/src/services/webmcp.ts#L2532-L2568","documentation":"A SafeWebMcpError of kind 'validation' thrown by the search_dashboard WebMCP tool when the query argument is an empty string (zero length). It fires after the string-type and max-length checks, rejecting queries that carry no search terms and would return meaningless default results. It is a generic empty-input validation guard; the input at fault is a query of ''. Callers must supply a non-empty search string.","triggerScenarios":"Thrown at src/services/webmcp.ts:768 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one non-whitespace search term","Validate non-empty input in the calling client before invoking the tool"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e586b8b4b80f595aa7ece295eec10d76f2921240","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}