From 00a449c750c87fda975815b1b4f6d8cfcdd66e1d Mon Sep 17 00:00:00 2001 From: Gunnar Date: Wed, 25 Oct 2023 10:45:45 +0200 Subject: [PATCH] RestHandler.cfc should catch NotAuthorized exception (#587) 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;