Expose structured `IggyError` in Python
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 432
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 173
Description
### Description
Python currently exposes Iggy failures as plain `RuntimeError` or `ValueError` with only a message. It should expose one `apache_iggy.IggyError` for all Iggy-specific failures, with `code`, a stable snake_case `name`, and a human-readable `message`.
### Affected area / component
Python SDK
### Proposed solution
- Add `apache_iggy.IggyError`.
- Use it for Rust `IggyError` values and current Iggy-specific validation failures.
- Set `code = as_code()`, `name = as_string()`, `message = to_string()`.
- `name` is the stable snake_case identifier.
- `message` is the human-readable error text.
- Keep `str(error) == error.message`.
- Replace ad hoc `PyRuntimeError` and `PyValueError` mappings with one helper.
- Update the stub, tests, and Python docs.
- Place this code in `foreign/python/src/error.rs`.
### Alternatives considered
_No response_
### Contribution
- [ ] I'm willing to submit a pull request to implement this feature
### Good first issue
- [x] I think this could be a good first issue for a new contributor
Contributor guide
Assessment
This issue has not been assessed yet.