From 68cc919badc8b09bf4591aace30bd6946b2633bc Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 12 Dec 2025 12:02:51 +0100 Subject: [PATCH] Handle unsupported auth types with NotImplementedException Throw NotImplementedException for unsupported authentication types in InvokeRecActionCommandHandler, including details like ProfileId and Id in the exception message for easier debugging. This prevents silent failures when encountering unknown authentication methods. --- .../RecActions/Commands/InvokeRecActionCommand.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs index f564b19..7f72707 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs @@ -107,10 +107,15 @@ public class InvokeRecActionCommandHandler( case "Digest Auth": case "OAuth 1.0": case "AWS Signature": - // These authentication methods require more complex implementations, - // often involving multi-step handshakes or specialized libraries. - // They are left as placeholders for future implementation. - break; + // These authentication methods require more complex implementations, + // often involving multi-step handshakes or specialized libraries. + // They are left as placeholders for future implementation. + default: + throw new NotImplementedException( + $"The authentication type '{action.EndpointAuthType}' is not supported yet. " + + $"ProfileId: {action.ProfileId}, " + + $"Id: {action.Id}" + ); } using var response = await http.SendAsync(httpReq, cancel);