Go to file
matthias.lotz e744a1e4cb feat(phase2): Add custom exception hierarchy (Phase 2.1)
Implemented structured exception handling:

Exception Hierarchy:
- BridgeError (base)
  ├── ConfigurationError
  │   └── ConfigValidationError
  ├── ConnectionError
  │   ├── MQTTConnectionError
  │   └── OdooAPIError (with status_code, response fields)
  ├── DeviceError
  │   ├── DeviceNotFoundError
  │   └── ParserError (with topic, payload context)
  └── ValidationError

Changes:
- Created exceptions.py with comprehensive exception classes
- Updated clients/odoo_client.py to use OdooAPIError
  * Replaced generic Exception with OdooAPIError
  * Added status_code and response context
  * Better error messages for API failures
- Updated clients/mqtt_client.py to import MQTTConnectionError
- Updated config/loader.py to use ConfigurationError
  * Replaced FileNotFoundError with ConfigurationError
  * Added file path context to errors
- Updated parsers/shelly_parser.py to import ParserError (for future use)

Benefits:
- Specific exception types enable targeted error handling
- Better debugging with structured error context
- Easier to catch and handle specific error categories
- Backward compatible - errors still propagate correctly
- Foundation for better error reporting in Phase 4

Remaining Phase 2 tasks (deferred):
- 2.2: main.py refactoring (will be separate PR)
- 2.3: Config management modernization (Pydantic migration)

See OPTIMIZATION_PLAN.md Phase 2.1 for details.
2026-02-18 22:27:28 +01:00
.github/workflows Phase 1: Foundation & Quality Tools 2026-02-18 22:11:25 +01:00
extra-addons/open_workshop/open_workshop_mqtt feat: IoT Bridge Health Monitoring & Dynamic MQTT Reconnection 2026-02-18 20:36:11 +01:00
iot_bridge feat(phase2): Add custom exception hierarchy (Phase 2.1) 2026-02-18 22:27:28 +01:00
odoo@fd43f0445a initial MQTT Development 2026-02-11 21:07:32 +01:00
.gitignore initial version 2026-02-10 20:00:27 +01:00
.readthedocs.yaml feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
DEPLOYMENT.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
DOCUMENTATION_STRATEGY.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
FEATURE_REQUEST_DEVICE_STATUS.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
FEATURE_REQUEST_OPEN_WORKSHOP_MQTT_IoT.md feat: benutzerfreundliche GUI für Device-Konfiguration mit Auto-Config-Push 2026-02-17 00:09:51 +01:00
IMPLEMENTATION_PLAN_DEVICE_STATUS.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
IMPLEMENTATION_PLAN.md Update Implementation Plan 2026-02-18 21:20:22 +01:00