-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
errors: replace CqlResponseParseError variant in QueryError
Since requests triggered via user API, cannot receive a response other than ERROR or RESULT, we need to narrow the response parsing errors accordingly. Before this commit, we would hold a CqlResponseParseError which contains a parsing errors for responses that should never be returned by the server for user requests. After hard work from previous commits, we can finally replace this overloaded variant with two variants - CqlResultParseError -> failed to deserialize RESULT response - CqlErrorParseError -> failed to deserialize ERROR response In case of failure of parsing other response, we will return a QueryError::ProtocolError saying that server returned an unexpected response. I think we should add more context to this error, but let's leave it for other PR which will be focused on ProtocolError refactor.
- Loading branch information
Showing
2 changed files
with
18 additions
and
14 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