Module: Terraspace::Cloud::Api::Concern::Errors

Included in:
Terraspace::Cloud::Api::Concern
Defined in:
lib/terraspace/cloud/api/concern/errors.rb

Instance Method Summary collapse

Instance Method Details

#error_message(result) ⇒ Object



7
8
9
10
# File 'lib/terraspace/cloud/api/concern/errors.rb', line 7

def error_message(result)
  $stderr.puts "ERROR: #{result["errors"]}"
  $stderr.puts "Your current settings. org: #{@org} project: #{@project}"
end

#errors?(result) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/terraspace/cloud/api/concern/errors.rb', line 3

def errors?(result)
  result.is_a?(Hash) && result.key?("errors")
end