Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move parseJsonWithSchema to utils package (@fehmer) #6109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fehmer
Copy link
Member

@fehmer fehmer commented Dec 12, 2024

@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff packages Changes in local packages labels Dec 12, 2024
Copy link
Member Author

@fehmer fehmer Dec 12, 2024

Choose a reason for hiding this comment

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

After adding the json.spec.ts file in util package eslint was complaining that the packages/funbox/__test__/tsconfig.json cannot find any files to include.

Instead of supressing this I added this test.

}
}

function prettyErrorMessage(issue: ZodIssue | undefined): string {
Copy link
Member Author

Choose a reason for hiding this comment

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

previously only the error.errors was used to compile the error message. It only contained the validation errors like Expected boolean, received string but not the path so it was unclear what exactly is wrong in the json.

Adding the full path like we do in the error handler on the backend api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend User interface or web stuff packages Changes in local packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants