Skip to content

Fix: surface API error messages and harden URL/transport handling - #163

Merged
derpixler merged 4 commits into
release/3-0-0from
fix/rr/transport-hardening
Sep 9, 2026
Merged

Fix: surface API error messages and harden URL/transport handling#163
derpixler merged 4 commits into
release/3-0-0from
fix/rr/transport-hardening

Conversation

@derpixler

@derpixler derpixler commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Base URLs can now be configured without the /api/v1 suffix; it is added automatically.
    • HTTP 400 responses now provide a dedicated bad-request error.
    • Error messages and validation details are more accurately surfaced from API responses.
    • Raw requests consistently accept all response content types.
  • Bug Fixes

    • Improved handling of API URLs with existing versioned or unversioned API paths.
    • Server errors now include relevant messages returned by the API.

@derpixler derpixler self-assigned this Sep 9, 2026
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1a35ec57-1f6d-4770-936d-b6ca72416545

📥 Commits

Reviewing files that changed from the base of the PR and between ebb64b7 and f621b87.

📒 Files selected for processing (7)
  • config/zammad.php
  • src/Bridge/LaravelServiceProvider.php
  • src/Bridge/SymfonyBundle.php
  • src/Core/Transport/RequestHandler.php
  • src/Exceptions/BadRequestException.php
  • src/Factory/GuzzleClientFactory.php
  • test/Unit/Core/RequestHandlerTest.php

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The client now accepts Zammad base URLs without /api/v1 and appends the API path in RequestHandler. Configuration and bridge documentation use the new URL format. HTTP 400 responses raise BadRequestException. Error messages and validation details come from response bodies. Raw requests always send Accept: */*. Tests cover URL normalization, error mapping, message extraction, validation details, and headers.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to f621b

The URL normalization and error-handling changes preserve the effective API endpoint and add the intended response mapping without an identified runtime regression.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.73% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: exposing API error messages and improving URL and transport handling.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

🤖 Coding task started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Completed: Fix pre-merge checks in PR #163View commit 420cf75

@derpixler
derpixler merged commit a25fa6e into release/3-0-0 Sep 9, 2026
4 checks passed
@derpixler
derpixler deleted the fix/rr/transport-hardening branch September 9, 2026 13:41
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