How to response with a HTTP/1.1 400 Bad Request?

How to response with a HTTP/1.1 400 Bad Request?

  
In the screen preperation, how do you to response with a "HTTP/1.1 400 Bad Request"?

Example

HTTP/1.1 400 Bad Request
     Content-Type: application/json
     Cache-Control: no-store

     {
       "error":"invalid_request"
     }
Issue unresolved. 
Not sure what you mean.

do you want to catch a 404 and show the user something?
- doubt if that is possible, either IIS catches the 404 and you never get to the app, or the user will get redirected to the error-pages?
 not sure though.
if you do get to your page with a 404, perhaps the extension httprequesthandler can be something.

or do you want to throw a 404 yourself ?
- perhaps the extension httprequesthandler is again your friend with setstatuscode action.

these are just guesses btw :)