Flow error handler
Closed this issue · 2 comments
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- This issue affects my Ory Cloud project.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe your problem
One of the most difficult aspects of integrating Ory into my frontend has been the flow error handling. I'm currently using this in my Next.js project, based on kratos-selfservice-ui-react-nextjs : https://gist.github.com/jgillich/b078cb3de9047054a458049187f27bbd
It has grown over time, and I'm pretty sure there are subtle bugs there because Sentry picks up on them occasionally, but I'm not sure how to resolve them. Porting it to the latest version of the ory client has been difficult as well. There are some error types in the client, but it doesn't seem complete nor do I know how to detect which error I actually have
This repo once again contains a bunch of boilerplate for error handling, and it also doesn't appear to handle everything correctly (#53)
I was excited about Ory Elements until I realized it doesn't (yet) solve this major pain point.
Describe your ideal solution
Ory should provide an easy to use method that takes an error type and returns actionable results, something like:
interface ParsedFlowError {
type: "redirect_to" | "bad_request" | "server_error"
redirect_url?: string
error_message?: string
}
This would be entirely framework-agnostic.
Workarounds or alternatives
Try to do it yourself, poorly
Version
latest
Additional Context
No response
Absolutely, this problem has been on the back of our heads for some while now. We also generally want to fix this for mobile UIs. But we don't have a good concept yet :(
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
- open a PR referencing and resolving the issue;
- leave a comment on it and discuss ideas on how you could contribute towards resolving it;
- leave a comment and describe in detail why this issue is critical for your use case;
- open a new issue with updated details and a plan for resolving the 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 🙏✌️