-
Notifications
You must be signed in to change notification settings - Fork 34
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
Remove console.info from EntityRequest error handler #210
Remove console.info from EntityRequest error handler #210
Conversation
…mInc#197) Removes default warning that recommends yarn when user runs npm install
Added is-it-pretty.sh script for travis-ci to check if there are files not passing prettier-standard closes ViacomInc#142
…Added a parameter to resolveReq ViacomInc#195
…Adjusted toggle for console.inf ViacomInc#195
@@ -129,7 +130,7 @@ function resolveRequest (acc, resolveReducer) { | |||
|
|||
// this is useful in the case the error itself is not logged by the | |||
// implementation | |||
console.info(redactedError.toString(), message) | |||
if (!omitLog) console.info(redactedError.toString(), message) |
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.
in order for this to be useful, the user would need a way of toggling showErr
to be true/false. however, I think we can do what @paulmolluzzo suggested in the issue, and just remove the console.info entirely - the message is included in the error, so the users can choose to log that info if they choose
…d console.info log from resolve ViacomInc#195
@@ -401,7 +400,6 @@ describe('resolve', () => { | |||
return transform('request:a9', {}).catch(err => { | |||
expect(err.statusCode).toEqual(404) | |||
expect(err.message).toMatchSnapshot() | |||
expect(console.info).toBeCalled() |
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.
we're using jest to mock console.info
, so we can remove some of that code as well. please search the file for console.info
and remove any code that you find if it's no longer being used.
….js): Removed console.info mock
…: Brought back test for inspect
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.
looks good!
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.
@victorsingh this pr looks good but the title and description do not match the change
can u update the title/description to match the PR’s code?
@acatl I updated the title and description so we can get this merged. Nice work @victorsingh! |
Removed console.info from EntityRequest resolve error handler
Removed console.info from EntityRequest resolve error handler
What: Removed
console.info
from /data-point/packages/data-point/lib/entity-types/entity-request/resolve.jsWhy: To prevent tests from being congested with logging information
How: The delete key 😄
Checklist:
Edit: Edited by @paulmolluzzo