IdentityServer3 icon indicating copy to clipboard operation
IdentityServer3 copied to clipboard

Allow custom exception handler

Open leastprivilege opened this issue 9 years ago • 7 comments

  • receives exception on unhandled exception situations
  • allows setting response status code, content (if any) and content type

For UI paths this needs to be called from the exception filter. For API paths we don't have an exception filter yet - investigate if filter or IExceptionHandler is more appropriate.

leastprivilege avatar Oct 11 '15 09:10 leastprivilege

Hey, Any updates regarding this? I need it also. At least in my case (which does not involve ui path) IExceptionHandler would be enough, but I am not sure this is the case in this feature. If so, I can create a PR.

omerlh avatar Mar 08 '16 11:03 omerlh

What is your use case?

leastprivilege avatar Mar 16 '16 05:03 leastprivilege

Hey I just want to customize the 500 errors - today is send back the stacktrace (unless it is something I've cahnged) and I wanted to just log and send generic message.

omerlh avatar Mar 16 '16 06:03 omerlh

A stacktrace? I think this is only for connections from localhost. Did you try it with a remote server already?

leastprivilege avatar Mar 16 '16 06:03 leastprivilege

Nope, but if this is the case than this is more than enough. I will update if I noticed otherwise.

omerlh avatar Mar 16 '16 06:03 omerlh

Hi Idsv team! Whats is the status on this?

We also this feature badly. In our scenario we want to be able to return a custom response given a certain type of exception is been thrown from inside idsv. In normal WebApi you would just create and IExceptionFilter and hook it up into HttpConfiguration. It would be neat if idsv provided same functionality.

mclausen avatar Aug 24 '16 13:08 mclausen

The status is that we don't have enough dev resources to make this feature happen right now.

leastprivilege avatar Aug 27 '16 17:08 leastprivilege