public object GetExamples() { return(new BasicApiProblem { HttpStatus = StatusCodes.Status500InternalServerError, Title = BasicApiProblem.DefaultTitle, Detail = "<meer informatie over de interne fout>", ProblemInstanceUri = BasicApiProblem.GetProblemNumber() }); }
public object GetExamples() { return(new BasicApiProblem { HttpStatus = StatusCodes.Status412PreconditionFailed, Title = BasicApiProblem.DefaultTitle, Detail = "De gevraagde minimum positie van de event store is nog niet bereikt.", ProblemInstanceUri = BasicApiProblem.GetProblemNumber() }); }
public object GetExamples() { return(new BasicApiProblem { HttpStatus = StatusCodes.Status406NotAcceptable, Title = BasicApiProblem.DefaultTitle, Detail = string.Empty, ProblemInstanceUri = BasicApiProblem.GetProblemNumber() }); }
protected override BasicApiProblem GetApiProblemFor(AggregateNotFoundException exception) { return(new BasicApiProblem { HttpStatus = (int)HttpStatusCode.BadRequest, Title = "Deze actie is niet geldig!", Detail = $"De resource met id '{exception.Identifier}' werd niet gevonden.", ProblemInstanceUri = BasicApiProblem.GetProblemNumber(), ProblemTypeUri = BasicApiProblem.GetTypeUriFor(exception) }); }
protected override BasicApiProblem GetApiProblemFor(ApiException exception) { return(new BasicApiProblem { HttpStatus = exception.StatusCode, Title = BasicApiProblem.DefaultTitle, Detail = exception.Message, ProblemInstanceUri = BasicApiProblem.GetProblemNumber(), ProblemTypeUri = BasicApiProblem.GetTypeUriFor(exception) }); }
private async Task HandleUnhandledException(Exception exception, HttpContext context) { var problemResponse = new BasicApiProblem { HttpStatus = (int)HttpStatusCode.InternalServerError, Title = BasicApiProblem.DefaultTitle, Detail = string.Empty, ProblemInstanceUri = BasicApiProblem.GetProblemNumber(), ProblemTypeUri = BasicApiProblem.GetTypeUriFor(exception as UnhandledException) }; if (exception != null) { _logger.LogError(0, exception, "[{ErrorNumber}] Unhandled exception!", problemResponse.ProblemInstanceUri); } await SetResponse(context, problemResponse); }