neo4j-core 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 467a06e8153327b05ab6bc9e37e3ee80987d81f3
4
- data.tar.gz: 5dcf253fa26a41db78cf183d076c44487932974e
3
+ metadata.gz: 8a8e5f37f8a4737e5f3ced9b4f613f9d08316227
4
+ data.tar.gz: 374a383a2539f26a79d43503b70a0b08ae5d5492
5
5
  SHA512:
6
- metadata.gz: 136921af617236ccf7839a8507703c9e5acccb2182b31c15f8ff523dfb40b1811f1974eea300cc4c3b1c33521eb5319af2ef80d762d5c44f607b0471349bafef
7
- data.tar.gz: 9f215749f19ed3588483e87e51dc4c88a9a179da0545a7ce460070325070755fab0deb6abb3b1c04bd365f0e805308e66ae4bdb2686206f2757a28dff7f78c74
6
+ metadata.gz: 358527fc8331056ed618670c3f76f215d344c19e461bf3e130bc40080e146ac36aaad58ca8454b1190250e5ea5d27d7713b6838b1416873256c1fe6da6ee9ad9
7
+ data.tar.gz: 462b56fa7bfee75204acfac66534d465ae4504e7d56ac17ced98a9a6944c5149ae82ec3bdf9ddff086d9731f100cffed598fff7501c0f1c4e6a3d64fd8df235c
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '7.0.0'
3
+ VERSION = '7.0.1'
4
4
  end
5
5
  end
@@ -44,6 +44,7 @@ module Neo4j
44
44
  def indexes(_session)
45
45
  response = @requestor.get('db/data/schema/index')
46
46
 
47
+ check_for_schema_response_error!(response.body)
47
48
  list = response.body || []
48
49
 
49
50
  list.map do |item|
@@ -58,6 +59,7 @@ module Neo4j
58
59
  def constraints(_session, _label = nil, _options = {})
59
60
  response = @requestor.get('db/data/schema/constraint')
60
61
 
62
+ check_for_schema_response_error!(response.body)
61
63
  list = response.body || []
62
64
  list.map do |item|
63
65
  {type: CONSTRAINT_TYPES[item[:type]],
@@ -66,6 +68,14 @@ module Neo4j
66
68
  end
67
69
  end
68
70
 
71
+ def check_for_schema_response_error!(response_body)
72
+ return if !response_body.is_a?(Hash) || !response_body.key?(:errors)
73
+
74
+ message = response_body[:errors].map { |error| "#{error[:code]}: #{error[:message]}" }.join("\n ")
75
+
76
+ fail CypherSession::ConnectionFailedError, "Connection failure: \n #{message}"
77
+ end
78
+
69
79
  def self.transaction_class
70
80
  require 'neo4j/core/cypher_session/transactions/http'
71
81
  Neo4j::Core::CypherSession::Transactions::HTTP
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Chris Grigg, Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday