Repository navigation
#15 - Clear error massages about "project" input - #48
Merged
Merged
Conversation
- Add `IllegalIdentifier` exception subclassing `InceptionBadResponse` to translate INCEpTION's opaque HTTP 500 "failed to parse a long" errors into actionable messages when non-numeric project/document identifiers are passed - Add `_request` wrapper method in `HttpInceptionAdapter` to apply error translation across all identifier-bearing adapter calls, consolidating three verb wrappers into one parameterized dispatch - Narrow type hints for project and document parameters from `Any` to `Optional[Union[int, str]]` to match actual usage - Update adapter documentation to clarify that the remote API accepts only numeric project and document ids - Add integration test pinning the current behavior (rejection of project names/slugs) and a future path for when upstream supports them - Expand unit test coverage with five new tests covering out-of-range numeric ids, cross-message error splicing, ambiguous identifiers with and without server-reported parameter names, and proper error pass-through for unrelated failures
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
+ Coverage 95.68% 96.19% +0.50%
==========================================
Files 20 20
Lines 696 736 +40
Branches 44 50 +6
==========================================
+ Hits 666 708 +42
+ Misses 19 18 -1
+ Partials 11 10 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in the PR
IllegalIdentifierexception subclassingInceptionBadResponseto translate INCEpTION's opaque HTTP 500 "failed to parse a long" errors into actionable messages when non-numeric project/document identifiers are passed_requestwrapper method inHttpInceptionAdapterto apply error translation across all identifier-bearing adapter calls, consolidating three verb wrappers into one parameterized dispatchAnytoOptional[Union[int, str]]to match actual usageHow to test manually
Automatic testing
Documentation