Description
Error responses are currently inconsistent across tools depending on where the failure happens:
- schema validation may expose raw Zod 3 messages / issue arrays
- some tools return curated domain-specific messages
- upstream service / HTTP failures are often passed through with minimal normalization
This makes the MCP error contract harder to consume, test, and document.
Scope
- keep existing upstream service behavior unchanged
- no Zod 4 migration
- improve only the errors exposed by
geocontext
Expected outcome
- consistent error wording and structure across all tools
- no raw Zod issue dumps exposed to clients
- clearer classification of upstream transient / service errors
- preserve useful backend details when relevant
Non-goals
- changing upstream service responses
- migrating from Zod 3 to Zod 4
Description
Error responses are currently inconsistent across tools depending on where the failure happens:
This makes the MCP error contract harder to consume, test, and document.
Scope
geocontextExpected outcome
Non-goals