-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise an error when REST API returns an error.
- Loading branch information
Showing
14 changed files
with
304 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module Neography | ||
|
||
class NeographyError < StandardError | ||
attr_reader :message, :stacktrace | ||
|
||
def initialize(message = nil, code = nil, stacktrace = nil) | ||
@message = message | ||
@stacktrace = stacktrace | ||
end | ||
end | ||
|
||
# HTTP Authentication error | ||
class UnauthorizedError < NeographyError; end | ||
|
||
# the Neo4j server Exceptions returned by the REST API: | ||
|
||
# A node could not be found | ||
class NodeNotFoundException < NeographyError; end | ||
|
||
# A node cannot be deleted because it has relationships | ||
class OperationFailureException < NeographyError; end | ||
|
||
# Properties can not be null | ||
class PropertyValueException < NeographyError; end | ||
|
||
# Trying to a delete a property that does not exist | ||
class NoSuchPropertyException < NeographyError; end | ||
|
||
# A relationship could not be found | ||
class RelationshipNotFoundException < NeographyError; end | ||
|
||
# Error during valid Cypher query | ||
class BadInputException < NeographyError; end | ||
|
||
# Invalid Cypher query syntax | ||
class SyntaxException < NeographyError; end | ||
|
||
# A path could not be found by node traversal | ||
class NotFoundException < NeographyError; end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.