Class: Lucid::Shopify::Response::GraphQLClientError

Inherits:
ClientError
  • Object
show all
Defined in:
lib/lucid/shopify/response.rb

Instance Method Summary collapse

Instance Method Details

#messageObject



34
35
36
37
38
39
40
41
42
43
# File 'lib/lucid/shopify/response.rb', line 34

def message
  case
  when response.errors?
    "bad response: #{response.error_messages.first}"
  when response.user_errors?
    "bad response: #{response.user_error_messages.first}"
  else
    "bad response"
  end
end