From b5bd4d1d4804a7fca123f565dffad1aedcc2354a Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Thu, 15 Feb 2024 18:21:31 -0500 Subject: [PATCH] Removed handling of SecurityTokenValidationException --- src/Api/Utilities/ExceptionHandlerFilterAttribute.cs | 5 ----- src/SharedWeb/Utilities/ExceptionHandlerFilterAttribute.cs | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs b/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs index 4dadedeb3e..cbfb096be5 100644 --- a/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs +++ b/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs @@ -82,11 +82,6 @@ public class ExceptionHandlerFilterAttribute : ExceptionFilterAttribute errorMessage = "Resource not found."; context.HttpContext.Response.StatusCode = 404; } - else if (exception is SecurityTokenValidationException) - { - errorMessage = "Invalid token."; - context.HttpContext.Response.StatusCode = 403; - } else if (exception is UnauthorizedAccessException) { errorMessage = "Unauthorized."; diff --git a/src/SharedWeb/Utilities/ExceptionHandlerFilterAttribute.cs b/src/SharedWeb/Utilities/ExceptionHandlerFilterAttribute.cs index f43544bca4..9fb6382a72 100644 --- a/src/SharedWeb/Utilities/ExceptionHandlerFilterAttribute.cs +++ b/src/SharedWeb/Utilities/ExceptionHandlerFilterAttribute.cs @@ -59,11 +59,6 @@ public class ExceptionHandlerFilterAttribute : ExceptionFilterAttribute errorMessage = "Resource not found."; context.HttpContext.Response.StatusCode = 404; } - else if (exception is SecurityTokenValidationException) - { - errorMessage = "Invalid token."; - context.HttpContext.Response.StatusCode = 403; - } else if (exception is UnauthorizedAccessException) { errorMessage = "Unauthorized.";