public Task <Entity.V1.Output> ExecuteAsync(Post_EntityRequestProblemDetails.V1 request, CancellationToken ctk = default) { EnsureArg.IsNotNull(request, nameof(request)); var problem = new OutOfCreditProblemDetails() { Balance = 30.0m, Accounts = { "/account/12345", "/account/67890" }, Status = StatusCodes.Status400BadRequest, }; throw new ProblemDetailsException(problem); }
public IActionResult Result() { var problem = new OutOfCreditProblemDetails { Type = "https://example.com/probs/out-of-credit", Title = "You do not have enough credit.", Detail = "Your current balance is 30, but that costs 50.", Instance = "/account/12345/msgs/abc", Balance = 30.0m, Accounts = { "/account/12345", "/account/67890" }, Status = StatusCodes.Status400BadRequest }; return(BadRequest(problem)); }
public Task <Entity.V1.Output> ExecuteAsync(Post_EntityRequestProblemDetails.V1 request, CancellationToken ctk = default) { EnsureArg.IsNotNull(request, nameof(request)); var problem = new OutOfCreditProblemDetails("You do not have enough credit.") { Detail = "Your current balance is 30, but that costs 50.", Instance = "/account/12345/msgs/abc", Balance = 30.0m, Accounts = { "/account/12345", "/account/67890" }, Status = StatusCodes.Status400BadRequest, }; throw new ProblemDetailsException(problem); }