Mistři v programování na #hovnokod

Ruby #299

def parse_response(object)
    return Hashie::Mash.new(JSON.parse(object))
  rescue => e
    #should handle here different error types/levels or else throw the exceptions to the upper layer (client)
    if e.is_a?(JSON::ParserError) && e.message =~ /<html>/
      raise "Invalid response from Platform server - #{self.class.parse_json_error(response.body)}"
    else
      raise e
    end
  end

HovnoKod,