Skip to content

✨ better printing of error messages - #283

Merged
ianardee merged 2 commits into
mainfrom
better-error
Nov 17, 2026
Merged

ianardee merged 2 commits into
mainfrom
better-error

Conversation

@ianardee

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new spec lacks an explicit ErrorItem import, causing isolated runs with nonempty errors to raise NameError before reaching the printing assertion.

1 open issue
What changed in this PR

This PR improves how the V2 parser displays API errors, replacing the compact message with structured, multiline output.

Changes:

  • Adds labeled HTTP status, title, code, and detail fields.
  • Includes numbered error items with pointers and details when present.
  • Adds a fixture-based spec for the formatted output.
File Description
spec/​v2/​parsing/​error_response_spec.rb Adds a spec comparing formatted errors with an expected fixture.
lib/​mindee/​v2/​parsing/​error_response.rb Formats error responses into readable sections with individual error details.

Review effort: Balanced

Comment thread spec/v2/parsing/error_response_spec.rb Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the structured V2 error-reporting change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@ianardee
ianardee merged commit 184fffd into main Nov 17, 2026
32 checks passed
@ianardee
ianardee deleted the better-error branch November 17, 2026 10:01
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