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: remove unused logging #71

Merged
merged 1 commit into from
Aug 7, 2019
Merged

fix: remove unused logging #71

merged 1 commit into from
Aug 7, 2019

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Aug 7, 2019

No description provided.

@bcoe bcoe requested a review from callmehiphop August 7, 2019 19:51
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 7, 2019
@@ -215,7 +215,7 @@ function teenyRequest(
const multipart = reqOpts.multipart as RequestPart[];
if (reqOpts.multipart && multipart.length === 2) {
if (!callback) {
console.log('Error, multipart without callback not implemented.');
console.error('multipart without callback not implemented.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we throw an exception or something in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have always been under the impression that trying to log like this is not awesome for libraries. The only case (I can think of) where the callback wasn't defined is if the user was expecting to get a stream back. In that case ... throwing feels correct, but also highly scary as folks are unlikely to catch it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my gut was an exception should be thrown here too, but I'm also feeling like we're down a rabbit hole, I want us to be back to a working version of teeny-request in @google-cloud/storage as soon as possible.

Let's log some tickets for this?

@codecov
Copy link

codecov bot commented Aug 7, 2019

Codecov Report

Merging #71 into master will increase coverage by 0.39%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage    68.1%   68.49%   +0.39%     
==========================================
  Files           1        1              
  Lines         348      346       -2     
  Branches       28       28              
==========================================
  Hits          237      237              
+ Misses        110      108       -2     
  Partials        1        1
Impacted Files Coverage Δ
src/index.ts 68.49% <0%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae23054...40056eb. Read the comment docs.

Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

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

I think keeping it like this (not throwing) for now is the safest thing to do.

@bcoe bcoe merged commit 4cb4967 into master Aug 7, 2019
@bcoe bcoe deleted the remove-logging branch August 7, 2019 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants