This topic has 2 replies, 2 voices, and was last updated 3 years, 3 months ago by pinku.

  • Author
    Posts
  • #23344
     pinku
    Participant

    Hi, I am throwing error from the onValidate method for managed object. This is indeed thrown back to the ui, this is when the managed object is created. however the custom message is not seen, how to achieve this, any help please.

    using the below

    
    throw {
        "code": 403, 
        "message": "custom error message",
        "detail" : {
            "var": "parameter1",
            "complexDetailObject" : [
                "detail1",
                "detail2"
            ]
        }
    };

    can’t see the “custom error message” . On the alert error message it says as below:

    "Unable to update resource. Validation Failed. Reason(s): Unknown"

    #23345
     Jake Feasel
    Moderator

    You will need to modify the UI so that the message you want to display is shown. The best place to handle this is probably within config/process/CommonIDMConfig.js. You can transform your custom error details into a string similar to the way that errors is computed for standard policy failures. That will then be passed into the EVENT_DISPLAY_MESSAGE_REQUEST handler and used to display the message.

    #23357
     pinku
    Participant

    Thanks Jake, I will give it a go. Initial attempt didn’t work though.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?