Skip to content

fix(core): surface application errors returned through the applications proxy - #736

Merged
andrii-bodnar merged 2 commits into
masterfrom
fix/proxied-application-errors
Oct 9, 2026
Merged

andrii-bodnar merged 2 commits into
masterfrom
fix/proxied-application-errors

Conversation

@andrii-bodnar

Copy link
Copy Markdown
Member

Errors an application returns through /applications/{identifier}/api/{path} arrive with the application's status code and body wrapped in Crowdin's data envelope. handleHttpClientError only read the top-level error or errors members, so these surfaced as "Request failed with status code N" and the application's message was lost.

Read the envelope when Crowdin's own members are absent: the thrown CrowdinError carries the application's message, its numeric code or else the HTTP status, and the whole body in apiError so callers can tell an application error from a Crowdin one.

…ns proxy

Errors an application returns through /applications/{identifier}/api/{path}
arrive with the application's status code and body wrapped in Crowdin's
`data` envelope. handleHttpClientError only read the top-level `error` or
`errors` members, so these surfaced as "Request failed with status code N"
and the application's message was lost.

Read the envelope when Crowdin's own members are absent: the thrown
CrowdinError carries the application's message, its numeric code or else
the HTTP status, and the whole body in `apiError` so callers can tell an
application error from a Crowdin one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.52459% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.92%. Comparing base (63407de) to head (3ba624e).

Files with missing lines Patch % Lines
src/core/error-handling.ts 87.94% 1 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #736      +/-   ##
==========================================
+ Coverage   88.88%   88.92%   +0.05%     
==========================================
  Files          46       47       +1     
  Lines        2543     2563      +20     
  Branches      340      350      +10     
==========================================
+ Hits         2260     2279      +19     
  Misses         85       85              
- Partials      198      199       +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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrii-bodnar

Copy link
Copy Markdown
Member Author

@yevheniyJ PTAL

Comment thread src/core/index.ts Outdated
Move CrowdinError, CrowdinValidationError, handleHttpClientError and
their helpers from core/index.ts to core/error-handling.ts. core/index.ts
re-exports the module, so the public exports are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit a1bbb1c into master Oct 9, 2026
10 checks passed
@andrii-bodnar
andrii-bodnar deleted the fix/proxied-application-errors branch October 9, 2026 10:36
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.

2 participants