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

Get TypeError: cb is not a function #44

Open
datapresso opened this issue Apr 1, 2019 · 0 comments
Open

Get TypeError: cb is not a function #44

datapresso opened this issue Apr 1, 2019 · 0 comments

Comments

@datapresso
Copy link

We are using connect-rest via express. We are not using connect directly and we noticed that the error cited in this issue title when we try to callback.

If we try to have "cb" below and it is always undefined and subsequent cb calls will result in the "cb is not a function".

	async function service( request, content, cb ){
	    console.log( 'Received headers:' + JSON.stringify( request.headers ) )
	    console.log( 'Received parameters:' + JSON.stringify( request.parameters ) )
	    console.log( 'Received JSON object:' + JSON.stringify( content ) )
	    console.log( 'cb:' + JSON.stringify(cb) )
	    return 'ok'
	}
	rest.get( [ { path: '/shake', version: '>=2.0.0' }, { path: '/twist', version: '>=2.1.1' } ], service )	
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

1 participant