Skip to content

fix(traverse_lineage): return graceful message on 404 instead of raw error#215

Open
mothership-ai[bot] wants to merge 1 commit intomainfrom
fix/aichat-818-traverse-lineage-404-handling
Open

fix(traverse_lineage): return graceful message on 404 instead of raw error#215
mothership-ai[bot] wants to merge 1 commit intomainfrom
fix/aichat-818-traverse-lineage-404-handling

Conversation

@mothership-ai
Copy link
Copy Markdown

@mothership-ai mothership-ai Bot commented Mar 31, 2026

Session owner: @abhinavmathur-atlan

Summary

  • AICHAT-818: traverse_lineage was propagating raw NotFoundError (404) messages to users when an asset has no lineage or the GUID doesn't exist in the lineage graph
  • Added a specific NotFoundError catch before the generic Exception handler that returns a user-friendly message with error: None, matching the existing "no results" pattern
  • 16 errors observed in 7 days in Braintrust — all will now return a clean response instead

Changes

  • modelcontextprotocol/tools/lineage.py: Import NotFoundError from pyatlan.errors, add specific 404 handling that returns {"assets": [], "error": None, "message": "No lineage found for this asset..."}

Test plan

  • Verify with an asset GUID that has no lineage — should return graceful message instead of raw 404 error
  • Verify with a non-existent GUID — should return graceful message
  • Verify with an asset that has lineage — should continue to return results normally
  • Verify other exceptions (e.g., auth errors) still propagate via the generic handler

🤖 Generated with Claude Code

…error

When an asset has no lineage or the GUID doesn't exist in the lineage
graph, the API returns 404. Previously this propagated as a raw
NotFoundError message. Now we catch NotFoundError specifically and
return a user-friendly message with error: None, matching the existing
"no results" pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant