Skip to content

No Error being throw when providing invalid credentials #20

@tproenca

Description

@tproenca

When I provide invalid credentials, instead of it throwing an Error object, it throws a runtime error and quits the program. The output:

<project>/node_modules/netflix2/lib/netflix2.js:404
      self.authUrls[url] = context.netflix.reactContext.models.memberContext.data.userInfo.authURL
                                                                             ^

TypeError: Cannot read property 'data' of undefined
    at Request._callback (<project>/node_modules/netflix2/lib/netflix2.js:404:78)
    at Request.init.self.callback (<project>/node_modules/request/request.js:185:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (<project>/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:180:13)
    at Gunzip.<anonymous> (<project>/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:272:13)
    at Gunzip.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions