public async Task RetryAsync(string settlementId, string userId) { if (string.IsNullOrEmpty(userId)) { throw new ValidationApiException(HttpStatusCode.BadRequest, "User id required"); } try { await _settlementService.RetryAsync(settlementId, userId); } catch (EntityNotFoundException) { throw new ValidationApiException(HttpStatusCode.NotFound, "Settlement not found"); } catch (InvalidOperationException exception) { throw new ValidationApiException(HttpStatusCode.BadRequest, exception.Message); } }