Skip to content

Conversation

@pepo1275
Copy link

Summary

  • BUG-001: APIError was inheriting from BaseModel (Pydantic) instead of Exception
  • This caused TypeError: catching classes that do not inherit from BaseException is not allowed when using except APIError
  • Added optional timestamp parameter for compatibility with existing http_client.py usage

Changes

  • Changed APIError to inherit from Exception
  • Added __init__, __str__, __repr__, and to_dict methods
  • Constructor accepts optional timestamp parameter (defaults to datetime.now())

Test plan

  • V1 Schema: Class can be instantiated and used in raise/except
  • V2 API: Compatible with http_client.py calls that pass timestamp=datetime.now()
  • V3 Real Query: MCP search for "Ley 40/2015" returns BOE-A-2015-10566

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)
  • Any code using except APIError

🤖 Generated with Claude Code

Pepo and others added 4 commits November 23, 2025 18:54
- 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>
Copy link
Owner

@ComputingVictor ComputingVictor left a 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!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

Copy link
Owner

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!!

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.

2 participants