Skip to content

Preserve Workbench business rule payloads for clearer validation errors#8048

Open
acwhite211 wants to merge 6 commits into
mainfrom
issue-8045
Open

Preserve Workbench business rule payloads for clearer validation errors#8048
acwhite211 wants to merge 6 commits into
mainfrom
issue-8045

Conversation

@acwhite211
Copy link
Copy Markdown
Member

Fixes #8045

Improve Workbench handling of back-end business rule validation errors. The back-end now preserves structured BusinessRuleException payloads in FailedBusinessRule upload results instead of stringifying and discarding them. The Workbench front-end uses those payloads to show uniqueness-rule failures and appends the conflicting record IDs when available. This makes duplicate catalog number errors clearer and avoids exposing raw Python exception tuples in validation tooltips.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests

Testing instructions

  • Open a Workbench dataset that triggers a duplicate catalog number uniqueness error.
  • Run validation.
  • Hover or inspect the errored cell.
  • Confirm the message reads like a normal validation error, for example Collectionobject must have unique catalognumber in collection.
  • Confirm the message includes conflicting record IDs when provided, for example Conflicting record IDs: 3347460.
  • Confirm the tooltip no longer shows the raw Python tuple/dict payload.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@acwhite211 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 2 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 419cde44-e5d6-414e-9250-38383f5e42da

📥 Commits

Reviewing files that changed from the base of the PR and between b3a6255 and f692eeb.

📒 Files selected for processing (5)
  • specifyweb/backend/workbench/upload/tests/test_upload_results_json.py
  • specifyweb/backend/workbench/upload/treerecord.py
  • specifyweb/backend/workbench/upload/upload_result.py
  • specifyweb/backend/workbench/upload/upload_table.py
  • specifyweb/frontend/js_src/lib/components/WorkBench/resultsParser.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8045

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 and usage tips.

@acwhite211 acwhite211 added this to the 7.12.2 milestone Apr 30, 2026
@acwhite211 acwhite211 marked this pull request as ready for review May 18, 2026 21:47
@acwhite211 acwhite211 requested review from a team May 18, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Workbench shows raw business rule exception for duplicate catalog number validation

1 participant