Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GOCBC-1149: Do not try parse response on error in GetAllScopes
Motivation ---------- If the management request fails to send for GetAllScopes then we attempt to parse the response body which causes a panic because the response object is nil. On error we should not be doing this. Changes ------- Move the call to tryParseErrorMessage out of the error handling block and into the resp.Status != 200 handling block. Change-Id: I856c026689967fef34207d3c2f99d68d5921000b Reviewed-on: http://review.couchbase.org/c/gocb/+/159007 Reviewed-by: Brett Lawson <brett19@gmail.com> Tested-by: Charles Dixon <chvckd@gmail.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
5 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