Skip to content

Release v0.1.1 - #4

Merged
explosivebit merged 3 commits into
mainfrom
release/v0.1.1
Apr 9, 2026
Merged

explosivebit merged 3 commits into
mainfrom
release/v0.1.1

Conversation

@explosivebit

Copy link
Copy Markdown
Contributor

Release v0.1.1

Companion release for moleculerpy 0.14.22 (PRD-020).

Closes KNOWN-ISSUES #19: moleculer_error_to_http honours MoleculerClientError.code for 401/403/404 mapping (was unconditional 400).

Commits:

  • 1c95efe fix(errors): client error code → HTTP status mapping
  • fa4cad7 chore(release): bump 0.1.0 → 0.1.1

Evidence: 380 unit tests pass (+3 regression), demo_web 13/13 with exact-match assertions, counterfactual proven.

Refs: MoleculerPy/moleculerpy#46, KNOWN-ISSUES.md #19

🤖 Generated with Claude Code

explosivebit and others added 3 commits April 8, 2026 23:03
Close KNOWN-ISSUES #19. Previously every MoleculerClientError funnelled
into BadRequestError(400) regardless of the underlying HTTP semantics, so
auth failures raised inside service actions surfaced as "400 Bad Request"
at the gateway — making scripted clients and middlewares unable to
distinguish missing credentials from malformed payloads.

moleculer_error_to_http now inspects err.code and dispatches to the
matching typed gateway error:
  * code=401 → UnauthorizedError (HTTP 401)
  * code=403 → ForbiddenError (HTTP 403)
  * code=404 → NotFoundError (HTTP 404)
  * anything else → BadRequestError (HTTP 400, unchanged fallback)

All four UnauthorizedError / ForbiddenError / NotFoundError classes
already existed in errors.py, so this is a pure dispatch fix with no new
public surface.

Evidence:
  * tests/unit/test_errors.py — 3 new regression tests
    (test_moleculer_client_error_401_maps_to_unauthorized, _403_maps_to_forbidden,
    _404_maps_to_not_found) plus the pre-existing default-to-400 test
    stays green so backwards compatibility is preserved
  * 380/380 tests pass (+3), coverage held at 94%

Refs: PRD-020, KNOWN-ISSUES.md #19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Companion release for moleculerpy 0.14.22 (PRD-020 bug closure sprint).
Ships the #19 fix committed in 1c95efe (moleculer_error_to_http honours
MoleculerClientError.code for 401/403/404 instead of funnelling every
client error into HTTP 400).

CHANGELOG entry documents the fix + counterfactual evidence (reverting
moleculer_error_to_http makes demo_web test_client_error_401/403/404
all fail with status=400).

Refs: PRD-020, KNOWN-ISSUES.md #19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[PRD-020] 0.1.1 — MoleculerClientError code → HTTP status mapping
@explosivebit
explosivebit merged commit bcb3230 into main Apr 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant