Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: restify.InvalidCredentialsError is not a function #21

Open
jonatasfreitasv opened this issue Apr 17, 2018 · 3 comments
Open

Comments

@jonatasfreitasv
Copy link

node_modules/restify-jwt/lib/index.js:71
        return next(restify.InvalidCredentialsError('No authorization token was found'));
                            ^

TypeError: restify.InvalidCredentialsError is not a function
    at middleware (/home/jonatas.freitas/Projects/rta_api/node_modules/restify-jwt/lib/index.js:71:29)
    at call (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/chain.js:164:9)
    at next (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/chain.js:120:9)
    at Chain.run (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/chain.js:123:5)
    at Server._runUse (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/server.js:976:19)
    at Server._runRoute (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/server.js:918:10)
    at Server._afterPre (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/server.js:888:10)
    at Immediate.preChainDone [as _onImmediate] (/home/jonatas.freitas/Projects/rta_api/node_modules/restify/lib/server.js:856:14)
    at runCallback (timers.js:791:20)
    at tryOnImmediate (timers.js:747:5)
@gdereese
Copy link

gdereese commented May 1, 2018

I'm also getting this error.

@gdereese
Copy link

gdereese commented May 1, 2018

@jonatasfreitasv Looks like this issue is fixed in the repository code, but a new version hasn't been published to npm for some time that includes this fix.

See issue #20; someone pointed out a fork of this project that is more current. I substituted this package for that one and no longer experienced the above issue.

@zgr024
Copy link

zgr024 commented Oct 20, 2018

I have submitted a pull request that will resolve the issue by using restify-errors for all error handling instances that were using restify.[errorHandler]. It looks like this package is no longer maintained for use with restify > 4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants