1
0
-1

Hi,

I need to customise the error message that is displayed to a user if there is a prefill error.

Instead of the default message "Sorry An Error Has Occurred", "Groovy Form Prefill Service Error", I would like a custom message like "Data missing from url. Please contact XYZ", or "Data missing from request parameters. Please contact ABC", or other custom messages.

I have added the code to throw new Exception, and that message appears in the TM error logs.

I would like a custom message to also appear to the user.

Thanks

Mark

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hey Mark, the error page you are seeing is a generic error page that is part of the Space your form is being rendered in. You can find the content for this page by opening your Space in TM (under Forms -> Form Spaces menu) and going to the Pages tab.

       

      You can edit this page to display different or additional information based on the data available on the Error Log object. For example, $errorLog.message will display the message you are passing into the Exception.

      Be aware that the changes you make will effect any other error type that triggers this page also.

      1. Mark Murray

        Hi Ben,

        thanks for the details. I expected that it was a template page, but I couldn't find it in my earlier searching.

        Thanks

      CommentAdd your comment...