How to trap exception in MVC when user is not authorized

Hi,

We have a simple test app based mainly on the Okta MVC Example.

I’m puzzled because if we have a user login that is not authorized in Okta for the app our app throws and exception and they see the familiar ASP.NET yellow stack trace.

Surely we can modify the app to trap or catch this error and display a helpful page?

Thanks

Hello @Hugh,

Did you resolve this? I am having the same issue…

Do these docs help?

Hello,

No, I did not resolve this and in fact have not even looked at this for some time.

I’ll take a look at what as going on and see if I did fix anything, I’ll come back to you in a day or two!

Regards

Hugh