Hey! Good morning. What is the recommended way to ...
# ory-selfhosting
s
Hey! Good morning. What is the recommended way to handle validation flow (or error flow) when calling the kratos API using the
adminCreateIdentity
API endpoint? We’re using this endpoint, but it doesn’t return anything useable for the
<Flow/>
component as seen in the
next.js
example. We’d like to use back-end validation, just like the web service flows, but the messages that are returning seem unusable 😅 (?)
1
b
Hi Ruben, could you elaborate a little on why the error messages are unusable for your use-case? What specifically is missing? The errors should be specific enough to handle them in backend or frontend.
s
Hey Jonas! Thank you for responding. Great product you guys are working on. The error messages requires quite some filtering when using the endpoint. The following example isn’t very user-friendly. That’s why I was wondering what you guys recommend for such:
Copy code
"I[#/traits/email] S[#/properties/traits/properties/email/format] "" is not valid "email""
b
I see. In theory, these json pointers can be used to identify fields in the request payload. But this message is not really usable here, I agree. Unfortunately the error messages are largely generated and not under our full “control”. But this is definitely an area, where we would like to improve in the future. Feel free to file a bug and include specific cases to give some context if you have any. If you have solutions in mind, do include them as well!
s
Okay! We’ll put a workaround in place 🙆 Thanks and I’ll create a ticket
@bland-eye-99092 Submitted the ticket
b
Awesome, thank you! 🙂