Skip to content

Display localized error messages from webhooks #1725

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

Open
glen-84 opened this issue May 14, 2022 · 4 comments
Open

Display localized error messages from webhooks #1725

glen-84 opened this issue May 14, 2022 · 4 comments

Comments

@glen-84
Copy link

glen-84 commented May 14, 2022

Display localized error messages from webhooks

Problem

When webhooks fail, a generic error message is displayed, which is not at all useful to an end user. I suggest allowing webhooks to return an error message to be displayed (see also #1696).

Solution

For example (in response to a failed webhook):

{
    "error": {
        "code": "abc123", // optional code
        "message": "Show this message in the UI.", // optional non-localized message
        "messageId": "access-denied", // look up localized message, and optionally fall back to "message" (when present)
        "context": "..." // optional additional context (stack trace, etc.) to be logged
    }
}

(this will obviously not work when the network request fails entirely)

Alternatives/workarounds

I don't think that there are any.

Additional context

#814 (comment)
#814 (comment)

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@robotdan
Copy link
Member

Would one of the solutions outlined here work?

Or are you looking for something else?

@glen-84
Copy link
Author

glen-84 commented May 14, 2022

I'm aware of that option, but it's only one string. The idea here is to be able to return messages (or message IDs) for different types of issues in different webhooks, to be displayed in the hosted UI and the admin panel.

The more general idea of returning data is also part of #1696.

@cch99
Copy link

cch99 commented Sep 7, 2023

Any updates to this issue? I'm looking for this feature to verify email address before registration. I need to be able to return a custom error message based on a lookup from a database.

@mooreds
Copy link
Collaborator

mooreds commented Sep 7, 2023

@cch99 this work is not currently planned. Here's our general roadmap guidance: https://fusionauth.io/docs/v1/tech/core-concepts/roadmap

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

No branches or pull requests

4 participants