Skip to content

#15 - Clear error massages about "project" input - #48

Merged
reckart merged 1 commit into
mainfrom
feature/15-Clear-error-massages-about-project-input
Aug 1, 2026
Merged

reckart merged 1 commit into
mainfrom
feature/15-Clear-error-massages-about-project-input

Conversation

@reckart

@reckart reckart commented Aug 1, 2026

Copy link
Copy Markdown
Member

What's in the PR

  • 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

How to test manually

  • See issue description

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

- 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
@reckart reckart added this to the 0.4.0 milestone Aug 1, 2026
@reckart reckart self-assigned this Aug 1, 2026
@reckart reckart added the ⭐️ Enhancement New feature or request label Aug 1, 2026
@reckart reckart added this to Kanban Aug 1, 2026
@github-project-automation github-project-automation Bot moved this to 🔖 To do in Kanban Aug 1, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.19%. Comparing base (6b922ec) to head (9403aa5).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reckart
reckart merged commit 23c5855 into main Aug 1, 2026
5 checks passed
@reckart
reckart deleted the feature/15-Clear-error-massages-about-project-input branch August 1, 2026 15:32
@github-project-automation github-project-automation Bot moved this from 🔖 To do to 🍹 Done in Kanban Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⭐️ Enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants