I'm throwing an ArgumentException in a service, but it comes back to the browser with HTTP status 200, I was expecting 400 (described here)
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Powered-By: ServiceStack/4.042 Win32NT/.NET
Date: Thu, 06 Aug 2015 18:12:33 GMT
I have MapExceptionToStatusCode set up for other exceptions, but even if I add ArgumentException => 400, it still comes back as 200.
Has this behaviour changed, or could it be remapped elsewhere?
Never mind. My fault. I was returning it instead of throwing it!! Copy/pasta error.
I'll leave post here in case anyone else does same silly thing.
Thanks for the update, but please also include the actual source code being used in future, as it saves a lot of time in being able to identify the issue and is needed in order to be able to reproduce the error.