private static ExecutionResult Validate(ExecutionOptions executionOptions, params UserAuthRole[] roles) { try { executionOptions.ValidateRole(roles); // Auth. filter } catch (Exception e) { ExecutionResult er = new() { Errors = new() }; er.Errors.Add(new ExecutionError(e.Message, e)); return(er); } return(null); } }