In our application, in the event of HTTP 400 error, we are handling the error and responding it as HTTP 200. During this time users are only able to see a message stating "Failed to serve the request". Dynatrace is unable to pick up these messages as errors and it is not alerting during this time. What are our possible ways to make dynatrace alert?
A HTTP response normally indicates a successful request. Is there a reason you are making a failed request send this response code? If you include this response code in the error detection settings for the service, it will register even the succesfull ones as failed. The only option will be to use a request attribute to create a custom error. Is there any parameter in the response header that shows if it was successful or not? If yes then you can create a request attribute for this and use that to create a custom error. See this link for more info on this.