public IHttpActionResult PostTerminatePicking(WaveCompletion wave) { try { PriIntegration.TerminarPickingOrder(wave.IDFuncionario, wave.WaveID, wave.Lines); } catch (InvalidOperationException invalidOperation) { return(BadRequest(invalidOperation.Message)); } catch (Exception e) { return(InternalServerError(e)); } return(Ok()); }