Commit Graph

3 Commits

Author SHA1 Message Date
IluaAir
9fd0ce1516 Implement enhanced error detection for NodeNotFound in OxiAPIError
- Added a new helper function `_looks_like_node_not_found_html` to identify NodeNotFound errors based on HTTP response content.
- Updated the `from_http_error` method in the `OxiAPIError` class to convert 500 status codes to 404 when a NodeNotFound error is detected, improving error handling and user feedback.
2026-04-17 20:45:16 +03:00
IluaAir
0b92e342e5 Enhance error handling in OxiAPI and Node classes
- Updated the `reload` method in the `OxiAPI` class to catch `HTTPError` exceptions and raise a custom `OxiAPIError` with context.
- Improved the `__call__` method in the `Node` class to handle `HTTPError` exceptions similarly, providing context-specific error messages.
- Introduced a new class method `from_http_error` in `OxiAPIError` for standardized error message generation based on HTTP status codes.
2026-03-26 20:10:05 +03:00
IluaAir
61892d8f51 Add OxiAPIError exception class for improved error handling
- Introduced a new `OxiAPIError` class to standardize error reporting in the OxiAPI.
- The class includes an optional status code for enhanced context in error messages.
2026-03-26 00:39:43 +03:00