-
Notifications
You must be signed in to change notification settings - Fork 64
Better error message for implicit branches #437
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
Conversation
Fixes COVESA#407 Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine for me although i Like the current Output more. It is more explicit and contains better context info (Input)
Is there any reason, why we can not keep the "input", and only change msg in this special case? |
It seems that when you add "manual" validators as described in https://docs.pydantic.dev/latest/concepts/validators/#json-schema-and-field-validators you have two options:
Changing to something like below would be quite easy. It works to give either assert or ValueError, we are currently a bit inconsistent it seems, sometimes we use assert, sometimes raise ValueError. Could not really see a pattern.
|
MoM:
|
Updated to use model validator instead, then |
Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com>
* Better error message for implicit branches Fixes COVESA#407 Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com> --------- Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com> Signed-off-by: Chaitanya Podalakuru <118563646+cpodalak@users.noreply.github.com>
* Better error message for implicit branches Fixes COVESA#407 Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com> --------- Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com>
* Better error message for implicit branches Fixes COVESA#407 Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com> --------- Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com>
Fixes #407
This PR adds a custom check and error if description is empty, and mention implicit branches in overlays as a possible error reason.
Current output: