Add api response message in the error popup message

Hello,

We have designed one block in the front end and also added popup in the block.In this block,we have added expression with varibale and variable showing service center log message value.We need to show api response message in this variable.and backend we have defined one server action and error messages are shown using assignment operator.

How to add api response like "Failed" in  outsystems front-end and back-end.

Could ypu please let me know How to show or add Api response message in the frontend error popup message.We need to display error message from webapi response in the front end popup message.

Thank You.

Not sure what you meant but if you already have an API that has a response info, you can just use it, or better to wrap it inside a server action and add a IsSuccess Return and the API response itself.  Set the IsSuccess value to true or false depending on the API return if it returns error add an exception handler aswell. on your front end, if you call the API, if it IsSuccess is true then return success message, if error then return error message

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.