I'm using taffy and I have an api call where if a required parameter is not provided I want to return an error message with a 400 status code. i.e.
if (not len(trim(arguments.serialNumber)) )
{
result["errorMessage"] = "Serial number was not provided";
return representationOf(result).withStatus(400);
}
The problem is in IIS7 I have custom error pages enabled so that I can display a custom 404 pages. Apparently this is interfering with the 400 error. When the API call is made and a 400 is returned, the response simply contains "bad request". If I disable custom errors
How can I set this up so both work?
-Phil