public async Task UpdateAssetAsync([FromBody] AssetSettlementEditModel model, string settlementId, string userId) { if (string.IsNullOrEmpty(userId)) { throw new ValidationApiException(HttpStatusCode.BadRequest, "User id required"); } try { await _settlementService.UpdateAssetAsync(settlementId, model.AssetId, model.Amount, model.IsDirect, model.IsExternal, userId); } catch (EntityNotFoundException) { throw new ValidationApiException(HttpStatusCode.NotFound, "Settlement not found"); } catch (InvalidOperationException exception) { throw new ValidationApiException(HttpStatusCode.BadRequest, exception.Message); } }