public async Task <HttpResponseMessage> GetVeiculo(string placa) { HttpResponseMessage response = new HttpResponseMessage(); try { Veiculo veiculo = await VeiculoDAO.GetVeiculoAsync(placa); response.Content = new ObjectContent(typeof(Veiculo), veiculo, JsonConfig.DefaultJsonMediaType); response.StatusCode = HttpStatusCode.OK; } catch (Exception ex) { response.Content = new ObjectContent(typeof(Exception), ex, JsonConfig.DefaultJsonMediaType); response.StatusCode = HttpStatusCode.InternalServerError; } ApiLog(response.StatusCode); return(response); }