You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, guys,
How can I use the ExceptionFactory to override 404 code with null result? I have tried below but none of these can work, it always throw exception when code is not 404:
ExceptionFactory = httpResponse => httpResponse.StatusCode != HttpStatusCode.NotFound ? Task.FromResult<Exception?>(null) : (Task<Exception?>)Task.CompletedTask,
Hi, guys,
How can I use the ExceptionFactory to override 404 code with null result? I have tried below but none of these can work, it always throw exception when code is not 404:
ExceptionFactory = httpResponse => httpResponse.StatusCode != HttpStatusCode.NotFound ? Task.FromResult<Exception?>(null) : (Task<Exception?>)Task.CompletedTask,
ExceptionFactory = httpResponse => httpResponse.StatusCode != HttpStatusCode.NotFound ? Task.FromResult<Exception?>(null) : null
Can someone guide me to the correct path?
Thanks,
Han
The text was updated successfully, but these errors were encountered: