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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user