So I have an API which is throwing a 422 response that I want to tell my user about, but I cannot make the error message I am defining on the Server Side come through to the Client Side.
Here is my server side code (I’m not sure if the Response should go in the Steps or Catch area, so I have it in both for now):
And here is what I get back on the client side:
So I am clearly creating a 422 error, but the message is always just “422” and not the message I am setting in my response
action step…
And I’m not sure what the response field of the Last Error should contain… would that contain the response from the API, so this JSON…?
Is there something sensible I can do to capture the “Message” field of error response and show it to the user?
Best wishes,
Antony.
PS - so if I then want further Server Action steps to only occur if the response is 200, how do I specify that in a condition?
Last updated: