-
Notifications
You must be signed in to change notification settings - Fork 8
fix: APIError now inherits from Exception instead of BaseModel #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add GitHub Actions CI workflow (lint, test matrix, connectivity) - Add Release workflow for PyPI publishing on tags - Add PR template with checklist - Add Dependabot for dependency updates - Add CLAUDE.md with project guidelines - Add PLAN_CI_CD.md with branching strategy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive testing bank structure (testing_mcp_boe_consolidada/) - Include 8 test levels: basic, documents, navigation, relations, summaries, tables, real use cases, stress tests - Add methodology documentation and test templates - Add progress tracking and comparison framework vs boe-mcp - Update .gitignore with Python, venv, IDE, OS, and testing patterns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…tion - Add RPVEA_BOE_FRAMEWORK.md with full methodology adapted from GVA - Introduce test types: Conformity (C) vs Quality (Q) - Create test_registry.json with 14 tests (10C + 4Q) - Add quality_gaps.json for tracking usability gaps - Document BUG-001 (APIError inheritance issue) - Add SESSION_001.md documenting initial findings - Add template_session.md for session documentation Key concepts: - Conformity test fail = BUG (must fix) - Quality test fail = GAP (evaluate for improvement) - Triple validation: V1 Schema, V2 API, V3 Real query 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Changed APIError to inherit from Exception for proper try/except usage - Added optional timestamp parameter for compatibility with http_client.py - Added __str__, __repr__, and to_dict methods for error handling - Fixes BUG-001: "catching classes that do not inherit from BaseException" Triple validation passed: Schema, API compatibility, Real query test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ComputingVictor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! The changes look solid. However, there are some files included that are not needed for this repository. Please remove the following that I commented.
Once these are removed, I'll be happy to approve the PR.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File not needed for this repository. Please remove it. Many Thanks!!
Summary
APIErrorwas inheriting fromBaseModel(Pydantic) instead ofExceptionTypeError: catching classes that do not inherit from BaseException is not allowedwhen usingexcept APIErrortimestampparameter for compatibility with existinghttp_client.pyusageChanges
APIErrorto inherit fromException__init__,__str__,__repr__, andto_dictmethodstimestampparameter (defaults todatetime.now())Test plan
http_client.pycalls that passtimestamp=datetime.now()Impact
This fix unblocks error handling throughout the codebase, particularly in:
src/mcp_boe/utils/http_client.py(lines 172-177, 180-185, 253-256)except APIError🤖 Generated with Claude Code