Skip to content

Conversation

heath-freenome
Copy link
Member

Reasons for making this change

Fixed #4357 by properly catching the error caused by trying to compile a bad schema in the validator

  • Updated validator.ts to move the this.ajv.getSchema() call inside of the try/catch to deal with bad schemas properly
  • Updated the RawValidatorTest.tsx component to add a replacer function to the JSON.stringify() function to properly output the validationError
  • Updated CHANGELOG.md accordingly

Before:
Screenshot 2025-08-15 at 2 48 55 PM

After:
Screenshot 2025-08-15 at 2 49 11 PM

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

…ling bad schema

Fixed rjsf-team#4357 by properly catching the error caused by trying to compile a bad schema in the validator
- Updated `validator.ts` to move the `this.ajv.getSchema()` call inside of the try/catch to deal with bad schemas properly
- Updated the `RawValidatorTest.tsx` component to add a replacer function to the `JSON.stringify()` function to properly output the `validationError`
- Updated `CHANGELOG.md` accordingly
@heath-freenome heath-freenome merged commit 1d3c624 into rjsf-team:main Aug 18, 2025
4 checks passed
@heath-freenome heath-freenome deleted the fix-4357 branch August 18, 2025 16:50
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.

Empty enum is blocking dependency after v5.5.1

2 participants