Skip to content

Conversation

akreisman-epam
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jan 8, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 9875dad on akreisman-epam:fix-content-type-with-charset-header-check into 8e6726f on hyperwallet:master.

@aseveryn-epam aseveryn-epam force-pushed the fix-content-type-with-charset-header-check branch from 85ca715 to d585eee Compare January 10, 2019 13:25
@aseveryn-epam aseveryn-epam force-pushed the fix-content-type-with-charset-header-check branch from d585eee to 3cefaae Compare January 10, 2019 21:08
Copy link

@vkorotchenko vkorotchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question, looks good otherwise.

callback(undefined, responseBody, decryptedData);
}
})
.catch(() => callback(`Failed to decrypt response for ${httpMethod} request`, res, res));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we passing res parameter 2 times?

Copy link
Contributor Author

@akreisman-epam akreisman-epam Jan 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For convension in callback we use 1st parameter for error, 2nd parameter for response body and 3rd parameter for entire response. As this part of code is inside processEncryptedResponse method res parameter is actually the response body, so in that case we could pass 3rd parameter as undefined, but I suppose that in that case we can pass response body(res) as the 3rd response parameter

@yherasym-hw yherasym-hw merged commit 5d811e6 into hyperwallet:master Jan 17, 2019
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.

6 participants