Skip to content

Commit

Permalink
Require octokit/rate_limit from lib/octokit/error.rb
Browse files Browse the repository at this point in the history
`Octokit::Error#build_error_context` uses `RateLimit.from_
response` but does not require the file containing
`RateLimit` explicitly.

This can lead to cases where the `RateLimit` module is not
available when needed, causing an error. This requires the
file explicitly where the module is used.

Fixes #1422.
  • Loading branch information
timrogers committed Jun 5, 2022
1 parent 4c0bee8 commit 21aa077
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/octokit/error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'octokit/rate_limit'

module Octokit
# Custom error class for rescuing from all GitHub errors
class Error < StandardError
Expand Down

0 comments on commit 21aa077

Please sign in to comment.