Sending appropriate response error status code.