Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Why doesn't RequestExceptionProcessorBehavior support null responses? #1094

Open
tonycoelho opened this issue Jan 20, 2025 · 0 comments

Comments

@tonycoelho
Copy link

RequestExceptionProcessorBehavior.Handle() doesn't support the ability to return a null response, i.e.:

if (!state.Handled)
{
    throw;
}

if (state.Response is null)
{
    throw;
}

return state.Response; //cannot be null if Handled

What is the reason for this? There are legitimate use cases where you might want to return a null response when an exception is handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant