Skip to content

Commit bfc82db

Browse files
committed
🐛 Closes #165: NoMethodError on nil request
Signed-off-by: Peter Boling <peter.boling@gmail.com>
1 parent 16902af commit bfc82db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/oauth/errors/unauthorized.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ def initialize(request = nil)
66
end
77

88
def to_s
9-
[request.code, request.message] * " "
9+
return "401 Unauthorized" if request.nil?
10+
11+
"#{request.code} #{request.message}"
1012
end
1113
end
1214
end

0 commit comments

Comments
 (0)