diff --git a/src/ReC.Application/RecActionViews/Commands/InvokeRecActionViewCommand.cs b/src/ReC.Application/RecActionViews/Commands/InvokeRecActionViewCommand.cs index 2f790f1..b73aaa8 100644 --- a/src/ReC.Application/RecActionViews/Commands/InvokeRecActionViewCommand.cs +++ b/src/ReC.Application/RecActionViews/Commands/InvokeRecActionViewCommand.cs @@ -35,14 +35,14 @@ public class InvokeRecActionViewCommandHandler( using var http = clientFactory.CreateClient(Http.ClientName); - if (action.RestType is null) + if (action.RestType is not RestType restType) throw new DataIntegrityException( $"Rec action could not be invoked because the RestType value is null. " + $"ProfileId: {action.ProfileId}, " + $"Id: {action.Id}" ); - using var httpReq = action.RestType + using var httpReq = restType .ToHttpMethod() .ToHttpRequestMessage(action.EndpointUri);