Skip to content

Normalize error responses across all tools #35

@esgn

Description

@esgn

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions