This repository has been archived by the owner on Oct 24, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 140
Conversation
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
when the response body is already an object don't try to parse it again should be fixing moul#149
houndci-bot
reviewed
Jan 27, 2017
fn err, ret || response.body.message | ||
else | ||
fn err, ret || JSON.parse(response.body).message | ||
when 3 then fn err, response, ret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line ends with trailing whitespace.
houndci-bot
reviewed
Jan 27, 2017
@@ -43,8 +43,12 @@ class module.exports.ApiBaseHTTP extends ApiBase | |||
arity = fn.length | |||
switch arity | |||
when 1 then fn ret | |||
when 2 then fn err, ret || JSON.parse(response.body).message | |||
when 3 then fn err, response, ret | |||
when 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line ends with trailing whitespace.
ping @moul |
ping @dave-irvine |
+1, I'm encountering the issue (#149) that this addresses. |
Thanks @dave-irvine ❤️ |
Could you also release a new version on npm? |
kahirul
pushed a commit
to exporto/node-gitlab
that referenced
this pull request
Sep 16, 2017
* fix double parsing of response.body when the response body is already an object don't try to parse it again should be fixing moul#149 * update to make houndci happy
moul
added a commit
that referenced
this pull request
Mar 30, 2018
* develop: fix double parsing of response.body (#159) Fixed API doc, merge request acceptance and protect branch with parameters (#177) Fixed repository.showCommit + Added repository.deleteTag (#157) Add project share endpoint (#156) Issues, edit method doesn't work and remove method missing (#150) Add new APIs (#148) Extend groups (#124) Add Trigger API and fix Build API bug (#132) Added subscriptions api for issues (#146) Pass an optional params object to the list builds API. (#147) Post-release version bump add `addTag` API
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when the response body is already an object don't try to parse it again
should be fixing #149
This is of interest for me because I have a project which fails because of that problem.
piceaTech/node-gitlab-2-github#16