Skip to content

Unauthorized error to_s breaks if request is nil #165

Closed
@rhymes

Description

@rhymes

According to

class Unauthorized < OAuth::Error
attr_reader :request
def initialize(request = nil)
@request = request
end
def to_s
[request.code, request.message] * " "
end
end

the argument request defaults to nil, but if called with nil, .to_s will break with

     NoMethodError:
       undefined method `code' for nil:NilClass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions