lib/caseblocks_api.rb in caseblocks_api-0.2.17 vs lib/caseblocks_api.rb in caseblocks_api-0.2.18
- old
+ new
@@ -42,9 +42,11 @@
params.merge!(:case_type_id => fetch_case_type_id(case_type))
response = self.class.post("/case_blocks/cases", :body => {:unique => true, :case => params}.to_json)
if response.code != 201
response_hash = {:body => response.body, :code => response.code, :message => response.message, :headers => response.headers.inspect}
raise CaseblocksAPI::CaseCreationError.new("Unable to create case - received response code #{response.code}", response_hash)
+ else
+ return response["message"]
end
end
def create_message(params)
query = {:message => params}