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

Fix/869 duplicate response header validation #132

Conversation

lewisdaly
Copy link
Contributor

Fix an issue in the message creation in src/domain/transfer/index.js, which was causing downstream errors when checking for duplicate transfers.

Added new unit tests to validate the message.

Copy link
Contributor

@rmothilal rmothilal left a comment

Choose a reason for hiding this comment

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

Happy

@@ -59,6 +60,10 @@ const prepare = async (headers, message, dataUri) => {
from: message.payerFsp,
type: 'application/json',
content: {
// TODO: will message.transferId always exist?
Copy link
Contributor

Choose a reason for hiding this comment

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

On a prepare you should always have a message.transferId as it is required by Joi validation

@lewisdaly
Copy link
Contributor Author

As discussed, hold off merging this for now until we address some of the message formatting issues.

@mdebarros
Copy link
Member

This will be merged as a temporary fix. See the following story for the long-term solution to be implemented: mojaloop/project#886

@mdebarros mdebarros merged commit 6f431b6 into mojaloop:master Aug 5, 2019
@lewisdaly lewisdaly deleted the fix/869-duplicate-response-header-validation-2 branch August 5, 2019 10:48
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.

3 participants