Alister Miller
08-May-2025 02:38:16
Hi.
In APEX 24.1.5, I am calling a PUT REST API for a Page Process, and am having trouble displaying the returned error text.
e.g. in the attached screenshots:
The Page Process uses "Invoke API" (1) of a REST Source (2), which returns an OUT parameter "errmsg" (4), which it stores in page item P431_ERRMSG. (5)
The Error Message for the Page Process is configured to be &P431_ERRMSG.
In testing, when the REST API returns an error (status_code=400, errmsg='some error text"), the apex page doesnt display the expected error, but rather show shows this error:
*1 error has occurred*
• undefined
I believe this is because P431_ERRMSG is not in the session state.
What is the proper way to return and show a custom errormessage from the PUT REST API for a Page Process?
Kind Regards,
Alister