From 20cd65d9b32a6a9e590ee83849ac46815eedaea0 Mon Sep 17 00:00:00 2001 From: Gunnar Date: Tue, 24 Oct 2023 20:36:13 +0200 Subject: [PATCH] RestHandler.cfc should catch NotAuthorized exception currently it handles only InvalidCredentials and TokenInvalidException --- system/RestHandler.cfc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/RestHandler.cfc b/system/RestHandler.cfc index 3c1aa0632..8b57e783b 100644 --- a/system/RestHandler.cfc +++ b/system/RestHandler.cfc @@ -62,6 +62,11 @@ component extends="EventHandler" { arguments.exception = e; this.onAuthenticationFailure( argumentCollection = arguments ); } + // Auth Issues + catch ( "NotAuthorized" e ) { + arguments.exception = e; + this.onAuthenticationFailure( argumentCollection = arguments ); + } // Token Decoding Issues catch ( "TokenInvalidException" e ) { arguments.exception = e;