Add a CaptureStartupErrors overload with RequestDelegate.
Open
api-suggestion
area-hosting
area-networking
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
## Background and Motivation
Allow to return Json or a custom error page on startup errors.
## Proposed API
```
.CaptureStartupErrors((context, exception) =>
{
context.Response.StatusCode = StatusCodes.Status500InternalServerError;
return context.ExecuteObjectResultAsync(exception);
})
```
Contributor guide
Research direction
The issue names CaptureStartupErrors but does not identify a file, test, or entry point. Locate the existing API and its related tests, then compare the proposed RequestDelegate overload and verify that startup errors can produce JSON or a custom error page as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100