Closed meyfa closed 3 weeks ago
Great points! The localization part is still very rough at the moment. The problem is that the error messages are coming from several sources
and since all of them use somewhat different formats it is a bit difficult to homogenize them.
However, this should be our target goal. One opportunity for improvement is to merge https://github.com/ory/jsonschema with the most recent version (v5) of https://github.com/santhosh-tekuri/jsonschema as I think they/he made a lot of improvements to the validation error handling.
I do think though that this will be a bit of work as we had to make quite a lot of adjustments in the code base to support custom hooks & better validation messages.
Any help would be appreciated here. It's basically grunt work... If you're interested I can lay out a plan what needs to be done to merge the two
Sure, why not. I'll see what I can do.
@aeneasr May I ask, what process did you have in mind for merging the large number of changes from upstream? (I would ask directly on ory/jsonschema but there is no Issues tab there.)
Sorry, I missed this - no idea to be honest. Maybe making a diff with the latest v2 version and ory/jsonschema, and then a new branch off of the next version, and then looking at the diff and trying to apply it.
That or resolving the conflicts using git merge (probably easier) / rebase
Hello contributors!
I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue
Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.
Unfortunately, burnout has become a topic of concern amongst open-source projects.
It can lead to severe personal and health issues as well as opening catastrophic attack vectors.
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.
If this issue was marked as stale erroneously you can exempt it by adding the backlog
label, assigning someone, or setting a milestone for it.
Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!
Thank you 🙏✌️
Preflight checklist
Describe the bug
Sending a request with empty or invalid fields will return UI messages with code 4000001 (
ErrorValidationGeneric
) but the message text itself contains a more precise error such as"length must be >= 3, but got 1"
or"a" is not valid "email"
. These texts seem to come from message codes 4000003 (ErrorValidationMinLength
) and 4000004 (ErrorValidationInvalidFormat
), respectively.To summarize the problem with this:
context
property is missingThis makes it impossible to localize the message client-side.
Reproducing the bug
Try performing a registration with an invalid email address:
Then the response body looks something like:
Notice the messages under
traits.email
.Relevant log output
Relevant configuration
Version
v0.8.0-alpha.3
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
This was previously reported in #1241 which was closed due to inactivity, although the problem remains.
I suspect the problem lies in https://github.com/ory/kratos/blob/0fe4155b878102b77f7f13de5f0754ff75961498/ui/container/container.go#L181 where the original error type is erased. Unfortunately I haven't got a clue on how this could/should be fixed.