public IActionResult PostCashflowType([FromBody] CashflowTypeFormDto form) { try { VerifyUser(); _validateService.Validate(form); var id = _service.CreateBudgetCashflowType(form); var result = new ResultFormatter(ApiVersion, General.CREATED_STATUS_CODE, General.OK_MESSAGE).Ok(); return(Created(string.Concat(Request.Path, "/", id), result)); } catch (ServiceValidationException e) { var result = new ResultFormatter(ApiVersion, General.BAD_REQUEST_STATUS_CODE, General.BAD_REQUEST_MESSAGE).Fail(e); return(BadRequest(result)); } catch (Exception e) { var result = new ResultFormatter(ApiVersion, General.INTERNAL_ERROR_STATUS_CODE, e.Message) .Fail(); return(StatusCode(General.INTERNAL_ERROR_STATUS_CODE, result)); } }