v2 P2: Exception hierarchy with real context
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 36
- Forks
- 7
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
Part of the v2 roadmap (pillar P2 — foundation).
Today, every raised exception is raise exception_cls() from error — no status code, no Monzo error body, no message. A caller catching MonzoHTTPError has no way to know what actually went wrong without attaching a debugger.
Scope
- Attach HTTP status, Monzo's
errorcode,message, and the raw response body to every exception instance. - Fill gaps in
MONZO_ERROR_MAP: 404 currently falls into the genericMonzoHTTPErrorrather than a dedicated not-found class; 502/503 aren't mapped at all. - Keep the existing class names as the public surface so
except MonzoRateErrorkeeps working — the break is in what the instance now carries.
Breaking: yes (exception instance shape changes; new subclasses)
Effort: M
Phase: alpha
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the exception-raising path and inspect MONZO_ERROR_MAP, focusing on where HTTP status, Monzo error details, and response bodies are currently discarded. Done means exceptions carry the specified context, 404/502/503 resolve to dedicated mapped classes, and existing class names remain catchable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100