Fixed mismatched message type when the error response is sent