How to catch 401 error when using POST method

0
Hello Experts, I’m still new to using REST and Mendix So I’m trying to build a login page using POST method to transfer username and password to another page, and I have already successfully done it by using a “Call REST (POST)” activity. My question is: How can I catch 401 error: Unauthorized and show message “username or password is incorrect” to the user when they type  their username and password wrong ? Thanks in advance and have a nice day
asked
1 answers
1

Hi Tran,

Set the response of the Call REST to a HttpResponse like so:

 

In this object there is a StatusCode and ReasonPhrase attribute which you can use.

answered