Can we display Rest API response error in UI page? if yes then how?

0
Hello everyone,   i have one form page i am submitting form data by rest post API, but when i am getting error from external system i want show that error in that form only. can we do this and how?  Thank you!
asked
3 answers
0

In the form entity , keep 1 variable to display this error , and make this variable in conditional visibility that it should be only visible when not empty

on submit button rest call , if rest call fails then change this variable and store error and show it , and when rest call is successful and then make it empty again

you can take help from below screenshot , suppose Name attribute on page , which will show error

image.png

answered
0

Hi Shankar,

yes you can create variable and store stacktrace or message from latest error whenever rest call fails, and show in UI

 

image.png

 

Hope it helps!

answered
0

Hi Shankar,

 

You can use the microflow activity show message. so that you can show the message to the user as it is user friendly. 

image.png

image.png

 

 

you can see there are two variables to help you with error and response - $latestError and $latestHttpResponse.

suggestion:  if you want to show the message to the user (other than Admin or Developers) don't display the Stacktrace as displays the technical information.

answered