'Error: Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer and local server is down and app crashed

C:\project\server-assign-11\node_modules\bson\lib\error.js:41
        var _this = _super.call(this, message) || this;
                           ^

BSONTypeError: Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer
    at new BSONTypeError (C:\project\server-assign-11\node_modules\bson\lib\error.js:41:28)
    at new ObjectId (C:\project\server-assign-11\node_modules\bson\lib\objectid.js:66:23)
    at ObjectId (C:\project\server-assign-11\node_modules\bson\lib\objectid.js:26:20)
    at C:\project\server-assign-11\index.js:58:26
    at Layer.handle [as handle_request] (C:\project\server-assign-11\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\project\server-assign-11\node_modules\express\lib\router\route.js:144:13)
    at Route.dispatch (C:\project\server-assign-11\node_modules\express\lib\router\route.js:114:3)
    at Layer.handle [as handle_request] (C:\project\server-assign-11\node_modules\express\lib\router\layer.js:95:5)
    at C:\project\server-assign-11\node_modules\express\lib\router\index.js:284:15
    at param (C:\project\server-assign-11\node_modules\express\lib\router\index.js:365:14)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source