public async Task <IActionResult> CloseCase([FromBody] CloseCaseRequest closeCaseRequest) { if (!ModelState.IsValid) { return(BadRequest()); } try { await _caseService.Close(closeCaseRequest.CaseReference, closeCaseRequest.ReasonTitle, closeCaseRequest.Description); return(Ok()); } catch (Exception ex) { _logger.LogError("CaseController.CloseCase: Failed to cloase crm case - {closeCaseRequest.CaseReference}", ex.InnerException); return(StatusCode(StatusCodes.Status500InternalServerError)); } }