How to use the execute resource, returns array

execute 'name' do
command 'do some command that returns exit code'
returns Integer, Array
end

how do I format the returns array so that the error is ignored for exit codes 0, 2, 3010