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
the doc said that :"To return an error as your response, simply throw the error you want. "
then i do this:
if (err) {
throw new geddy.errors.BadRequestError();
}
i get follow:
Bad Request
at Steps.index (/Users/hyq/Brisker/Server/to_do/app/controllers/steps.js:9:17)
at utils.mixin.load (/Users/hyq/Brisker/Server/to_do/node_modules/geddy/node_modules/model/lib/adapters/mongo/index.js:310:13)
at Cursor.toArray (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/cursor.js:163:16)
at Cursor.nextObject.commandHandler (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/cursor.js:709:16)
at Db._executeQueryCommand (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/db.js:1847:9)
at Server.Base._callHandler (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/base.js:445:41)
at Server.connect.connectionPool.on.server._serverState (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/server.js:478:18)
at MongoReply.parseBody (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at Server.connect.connectionPool.on.server._serverState (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/server.js:436:20)
at emit (events.js:95:17)
Process finished with exit code 8
The process exist in development mode while catching the uncaughtException in production mode.
How should i do to get the correct error response?
The text was updated successfully, but these errors were encountered:
the doc said that :"To return an error as your response, simply throw the error you want. "
then i do this:
if (err) {
throw new geddy.errors.BadRequestError();
}
i get follow:
Bad Request
at Steps.index (/Users/hyq/Brisker/Server/to_do/app/controllers/steps.js:9:17)
at utils.mixin.load (/Users/hyq/Brisker/Server/to_do/node_modules/geddy/node_modules/model/lib/adapters/mongo/index.js:310:13)
at Cursor.toArray (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/cursor.js:163:16)
at Cursor.nextObject.commandHandler (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/cursor.js:709:16)
at Db._executeQueryCommand (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/db.js:1847:9)
at Server.Base._callHandler (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/base.js:445:41)
at Server.connect.connectionPool.on.server._serverState (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/server.js:478:18)
at MongoReply.parseBody (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at Server.connect.connectionPool.on.server._serverState (/Users/hyq/Brisker/Server/to_do/node_modules/mongodb/lib/mongodb/connection/server.js:436:20)
at emit (events.js:95:17)
Process finished with exit code 8
The process exist in development mode while catching the uncaughtException in production mode.
How should i do to get the correct error response?
The text was updated successfully, but these errors were encountered: