lib/domoscio_rails.rb in domoscio_rails-0.3.6 vs lib/domoscio_rails.rb in domoscio_rails-0.3.7
- old
+ new
@@ -11,10 +11,11 @@
require 'domoscio_rails/http_calls'
require 'domoscio_rails/resource'
require 'domoscio_rails/data/content.rb'
require 'domoscio_rails/data/event.rb'
require 'domoscio_rails/data/instance.rb'
+require 'domoscio_rails/data/recommendation.rb'
require 'domoscio_rails/data/learning_session.rb'
require 'domoscio_rails/data/student.rb'
require 'domoscio_rails/knowledge/knowledge_edge.rb'
require 'domoscio_rails/knowledge/knowledge_graph.rb'
require 'domoscio_rails/knowledge/knowledge_node_content.rb'
@@ -128,10 +129,10 @@
def self.raise_http_failure(uri, response, params)
unless response.kind_of? Net::HTTPSuccess
if response.blank?
raise ResponseError.new(uri, 500, {error: {status: 500, message: 'AdaptiveEngine not available'}}, {}, params)
else
- body = DomoscioRails::JSON.load((response.body.nil? ? '' : response.body), :symbolize_keys => true)
+ body = {error: {status: response.code, message: DomoscioRails::JSON.load((response.body.nil? ? '' : response.body), :symbolize_keys => true)}}
raise ResponseError.new(uri, response.code.to_i, body, response.body, params)
end
end
end
\ No newline at end of file