Skip to content

Commit

Permalink
🔀 Merge pull request #212 from oauth-xx/issue/165-initializer-logic-p…
Browse files Browse the repository at this point in the history
…roblem

🐛 Closes #165: NoMethodError on nil request
  • Loading branch information
pboling committed Oct 31, 2021
2 parents 6af33e4 + bfc82db commit 18b741e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/oauth/errors/unauthorized.rb
Expand Up @@ -6,7 +6,9 @@ def initialize(request = nil)
end

def to_s
[request.code, request.message] * " "
return "401 Unauthorized" if request.nil?

"#{request.code} #{request.message}"
end
end
end

0 comments on commit 18b741e

Please sign in to comment.