-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fb/asset ownership transfer api #345
Fb/asset ownership transfer api #345
Conversation
|
||
function handelAssetOwnershiptransfer(req, err){ | ||
var rspObj = req.rspObj | ||
console.log('User transferAssetOfDeleteduser failed', JSON.stringify(err)) |
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.
Remove these console logs, and user proper logger object.
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.
Why are printing the error log as soon as method hits.
var rspObj = req.rspObj | ||
console.log('User transferAssetOfDeleteduser failed', JSON.stringify(err)) | ||
if(err && err.response && err.response.data) { | ||
console.log(`User transferAssetOfDeleteduser err ==> ${req.params.userId} ==>`, JSON.stringify(err.response.data)); |
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.
User Logger object and remove console.log
console.log(`User transferAssetOfDeleteduser err ==> ${req.params.userId} ==>`, JSON.stringify(err.response.data)); | ||
} | ||
const errCode = userMessages.DELETE.OWNERSHIP_TRANSFER_FAIL; | ||
rspObj.errCode = userMessages.DELETE.FAILED_CODE; |
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.
Is this DELETE.FAILED_CODE?
Check the error messages.
try { | ||
KafkaService.sendRecordWithTopic(req.rspObj.request, envVariables.COKREAT_USER_DELETE_KAFKA_TOPIC, function (err, res) { | ||
if (err) { | ||
handelAssetOwnershiptransfer(req, err); |
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.
The method name is not proper. You are not having the positive scenario here.
User the right method name lik "owershipTransferErrorHandler"
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: