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

Include response code in unexpected network error message #219

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/video_info/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ def _set_data_from_api(api_url = _api_url)
e.io.respond_to?(:status)
response_code = e.io.status[0]
if response_code == "400"
log_warn("your API key is probably invalid. Please verify it.")
log_warn("Your API key is probably invalid. Please verify it.")
end
end

msg = 'unexpected network error while
fetching information about the video'
msg = "Unexpected network error while fetching information about the video"
msg << " (response code: #{response_code})" if defined?(response_code)
raise VideoInfo::HttpError.new(msg)
end

Expand Down