# File lib/aws/core/json_client.rb, line 28 def extract_error_details response if response.http_response.status >= 300 and body = response.http_response.body and json = (::JSON.load(body) rescue nil) and type = json["__type"] then code = type.split('#').last if code == 'RequestEntityTooLarge' message = 'Request body must be less than 1 MB' else message = json['message'] || json['Message'] end [code, message] end end