Skip to content

Conversation

@jrjohnson
Copy link
Member

To prevent bugs such as we had with validating the session overview (#8492), where an error in a field that isn't currently open or showing errors prevents validation, this now logs those errors to the console. This isn't visible much to users, as it's in the console, but I used the intl service to translate them into nice errors anyway.

@netlify
Copy link

netlify bot commented Apr 10, 2025

Deploy Preview for ilios-frontend ready!

Name Link
🔨 Latest commit eba2127
🔍 Latest deploy log https://app.netlify.com/sites/ilios-frontend/deploys/67f95aec6153130008a828a4
😎 Deploy Preview https://deploy-preview-8505--ilios-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

To prevent bugs such as we had with validating the session overview,
where an error in a field that isn't currently open or showing errors
prevents validation, this now logs those errors to the console. This
isn't visible much to users, as it's in the console, but I used the intl
service to translate them into nice errors anyway.
We use the `values` key to pass information to the translation, it
should always be an object and if it's not set (for instance in a `test`
type of validation where it's developer specified) we should account for
that and not expect it to be present. This is what we do in the
validations message component.
Sometimes we validate a non-ember thing (like ProposedUser) and it
doesn't have an owner. In that case we can pass one in.
@jrjohnson
Copy link
Member Author

I'm keeping this in draft mode, not sure if it's a good idea. It makes tests noisy. Also, is it overly complicated?

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.

1 participant