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 "Digest Auth":
|
||||||
case "OAuth 1.0":
|
case "OAuth 1.0":
|
||||||
case "AWS Signature":
|
case "AWS Signature":
|
||||||
// These authentication methods require more complex implementations,
|
// These authentication methods require more complex implementations,
|
||||||
// often involving multi-step handshakes or specialized libraries.
|
// often involving multi-step handshakes or specialized libraries.
|
||||||
// They are left as placeholders for future implementation.
|
// They are left as placeholders for future implementation.
|
||||||
break;
|
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);
|
using var response = await http.SendAsync(httpReq, cancel);
|
||||||
|
|||||||
Reference in New Issue
Block a user