Closed CorentinTerente closed 5 years ago
{{uri}}/secured/users/contacts/5c38e9730db640087226764
id non existant en base de données, renvoie une erreur 500 non catché:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>CastError: Cast to ObjectId failed for value "5c38e9730db640087226764" at path "_id" for model "user" <br> at new CastError (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/error/cast.js:27:11) <br> at ObjectId.cast (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/schema/objectid.js:158:13) <br> at ObjectId.SchemaType._castForQuery (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/schematype.js:1088:15) <br> at ObjectId.castForQuery (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/schema/objectid.js:198:15) <br> at ObjectId.SchemaType.castForQueryWrapper (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/schematype.js:1045:15) <br> at cast (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/cast.js:269:32) <br> at cast (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/cast.js:92:25) <br> at model.Query.Query.cast (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/query.js:3305:12) <br> at castQuery (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/query.js:3194:18) <br> at _update (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/query.js:3013:21) <br> at model.Query.Query.update (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/mongoose/lib/query.js:2811:10) <br> at Object.updateContact (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/src/users/user.services.js:175:6) <br> at updateContact (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/src/users/user.controller.js:127:16) <br> at Layer.handle [as handle_request] (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/express/lib/router/layer.js:95:5) <br> at next (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/express/lib/router/route.js:137:13) <br> at Route.dispatch (/home/bas/app_968e6bc9-3efe-43a2-b4a1-6d138d6971f6/node_modules/express/lib/router/route.js:112:3) </pre> </body> </html>
{{uri}}/secured/users/contacts/5c38e9730db640087226764
id non existant en base de données, renvoie une erreur 500 non catché: