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

Cryptic errors raised if http_logger_options are nil #7

Open
RickCarlino opened this issue Apr 9, 2014 · 1 comment
Open

Cryptic errors raised if http_logger_options are nil #7

RickCarlino opened this issue Apr 9, 2014 · 1 comment

Comments

@RickCarlino
Copy link

The problem:

If you include the gem in a project and attempt to make an HTTP request without first setting Net::HTTP.http_logger_options for the current environment, a cryptic #<NoMethodError: undefined method 'info' for nil:NilClass> from lib/net-http-spy.rb:24 within Net::HTTP#initialize() is raised.

It appears that a similar issue was raised 2 years ago in issue #2 .

Work around

I fixed the issue by simply adding a config to the correct environment file. It was a pretty simple fix and was just carelessness on my part, but would it be appropriate to add a more descriptive error / initialize some sane defaults to prevent nils? If so, I would be willing to write a pull request / specs for it. Please let me know. Posting this issue up for now incase others have come across this error.

@johnceh
Copy link

johnceh commented Jun 23, 2014

Fixed it for me. Thanks.

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

No branches or pull requests

2 participants