Do I understand correctly that there will be an error in this function if there is no data?
I get error concat': [!] no implicit conversion of Hash into Array (TypeError) when no data in response available
Or suppose some garbage in response. But in list_assets when no response we have Hash.new() :)
def list_all_assets(repository: nil)
Array.new.tap do |assets|
loop do
# Error: concat': [!] no implicit conversion of Hash into Array (TypeError)
assets.concat(list_assets(repository: repository, paginate: true))
break unless paginate?
end
end
end