Skip to content

Commit 411a8c5

Browse files
nenoganchevroute
authored andcommitted
Enable access to pending connections in StatusError
The list of pending connections could be useful for Ferrum clients, either for error reporting or for automated troubleshooting. Expose them as a readable attribute.
1 parent 3b3f648 commit 411a8c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ferrum.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class NoSuchTargetError < Error; end
1010
class NotImplementedError < Error; end
1111

1212
class StatusError < Error
13+
attr_reader :pendings
14+
1315
def initialize(url, pendings = [])
16+
@pendings = pendings
1417
message = if pendings.empty?
1518
"Request to #{url} failed to reach server, check DNS and/or server status"
1619
else

0 commit comments

Comments
 (0)