class Github::Error::ServiceError

def decode_data(body)

Other tags:
    Api: - private

Parameters:
  • body (String) --
def decode_data(body)
  if body.respond_to?(:to_str) &&
     body.length >= MIN_BODY_LENGTH &&
     @headers[:content_type] =~ /json/
    JSON.parse(body, symbolize_names: true)
  else
    body
  end
end