You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> var ApiProblem = require('node-api-problem');
undefined
>
> var Issue12Problem = new ApiProblem('http://api.acme.com/kb/issues/12','Error documented by issue 12');
undefined
> Issue12Problem.send()
I get the following error message:
TypeError: Issue12Problem.send is not a function
at repl:1:16
at sigintHandlersWrap (vm.js:22:35)
at sigintHandlersWrap (vm.js:96:12)
at ContextifyScript.Script.runInThisContext (vm.js:21:12)
at REPLServer.defaultEval (repl.js:313:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:513:10)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:188:7)
Grepping the repository doesn't mention send outside of the README :(
Hey,
in
https://github.com/eoko/node-api-problem/tree/4071cfdcee096f9cbfd6c8d36b51ab6f032f2000#use-api-problem-in-a-middleware the README documents how to send errors in an express middleware like this:
however, when I execute this:
I get the following error message:
Grepping the repository doesn't mention
send
outside of the README :(I've been using
in the meantime as a workaround, but maybe that should be part of this very library.
The text was updated successfully, but these errors were encountered: