Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OrientDB 2.2. #25

Merged
merged 1 commit into from
Oct 13, 2016
Merged

Add support for OrientDB 2.2. #25

merged 1 commit into from
Oct 13, 2016

Conversation

lukeasrodgers
Copy link
Owner

2.2 appears to make a few changes that affect error handling, namely:

  • 400 HTTP codes are returned for malformed/invalid queries and commands
  • for these requests, a java-style error class is no longer returned in the response

In order to support this while not breaking backwards compatibility, we can introduce a new error class, ParsingError that inherits from ClientError. Older clients will continue to work, and anyone conditionally handling ClientErrors by examining the error message and looking for a string like "OCommandSQLParsingException" can continue to do so, or alternatively rescue ParsingError.

People using OrientDB >= 2.2 should not expect that these requests will have "OCommandSQLParsingException" in the error message/response body.

2.2 appears to make a few changes that affect error handling, namely:
* 400 HTTP codes are returned for malformed/invalid queries and commands
* for these requests, a java-style error class is no longer returned in
the response

In order to support this while not breaking backwards compatibility, we
can introduce a new error class, `ParsingError` that inherits from
`ClientError`. Older clients will continue to work, and anyone
conditionally handling `ClientError`s by examining the error message and
looking for a string like "OCommandSQLParsingException" can continue to
do so, or alternatively rescue `ParsingError`.

People using OrientDB >= 2.2 should not expect that these requests will
have "OCommandSQLParsingException" in the error message/response body.
@lukeasrodgers lukeasrodgers merged commit 1ba0c34 into master Oct 13, 2016
@lukeasrodgers lukeasrodgers deleted the odb-2.2.11-compat branch October 13, 2016 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant