fix(feedback): preserve API error messages - #5644
Draft
samrusani wants to merge 1 commit into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
Summary
{ success: false, error }rejections across feedback loading, comments, and administration.Problem
The feedback API client rejects unsuccessful responses as plain objects rather than
Errorinstances. Several feedback surfaces only handledError, so they discarded the server's actionable message and displayed generic failure copy.Solution
messageForApiErroraccepts only a non-emptyError.messageor a non-empty stringerrorproperty. All other shapes use the caller-provided fallback, so raw or nested rejection payloads never reach the UI. The five existing feedback error paths now share this behavior without changing transport, request lifecycle, logging, or backend enforcement.Submission Checklist
## Related— N/A: no coverage-matrix feature ID changes.Closes #NNNin the## RelatedsectionImpact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fix/5440-feedback-api-errors7be8d766ebe2dba5071a8bb85c0d80a21f0256b2Validation Run
pnpm --filter openhuman-app format:checkpnpm typecheckpnpm lint(0 errors; existing warnings only)Validation Blocked
command:cargo clippy -p openhuman -- -D warningserror:the isolated checkout does not contain the vendoredtinyagents/Cargo.tomlrequired by the workspace.impact:no Rust or Tauri files changed. This prevented the repository-wide Rust clippy portion of the pre-push hook; the focused frontend tests, coverage, typecheck, lint, and formatting checks passed. The validation environment also emitted a Node engine warning because it was below the repository-declared Node 24 minimum; CI remains authoritative for the supported runtime.Behavior Changes
Parity Contract
Error.messagehandling, translated fallbacks, request cancellation guards, pending/loading state, and logging are unchanged.Error.messagerender; no raw payload stringification is introduced.Duplicate / Superseded PR Handling