You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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>
fromlib/net-http-spy.rb:24
withinNet::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.
The text was updated successfully, but these errors were encountered: