Error Command failed with exit code 1 - MongoDb node js

Hiya

I am building an API with node js and using MongoDB Atlas to host my database. The API gets deployed on the first go without any errors, but when I try to access some endpoints, I get 502 error codes and “Deploy failed Exited with status 1”
Would someone be able to assess me on this issue, please?

MongoNotConnectedError: Client must be connected before running operations

Feb 22 05:01:46 PM at executeOperationAsync (/opt/render/project/src/node_modules/mongodb/lib/operations/execute_operation.js:23:19)

Feb 22 05:01:46 PM at /opt/render/project/src/node_modules/mongodb/lib/operations/execute_operation.js:12:45

Feb 22 05:01:46 PM at maybeCallback (/opt/render/project/src/node_modules/mongodb/lib/utils.js:270:21)

Feb 22 05:01:46 PM at executeOperation (/opt/render/project/src/node_modules/mongodb/lib/operations/execute_operation.js:12:38)

Feb 22 05:01:46 PM at AggregationCursor._initialize (/opt/render/project/src/node_modules/mongodb/lib/cursor/aggregation_cursor.js:46:73)

Feb 22 05:01:46 PM at [kInit] (/opt/render/project/src/node_modules/mongodb/lib/cursor/abstract_cursor.js:450:38)

Feb 22 05:01:46 PM at next (/opt/render/project/src/node_modules/mongodb/lib/cursor/abstract_cursor.js:510:32)

Feb 22 05:01:46 PM at AggregationCursor.next (/opt/render/project/src/node_modules/mongodb/lib/cursor/abstract_cursor.js:226:16)

Feb 22 05:01:46 PM at [Symbol.asyncIterator] (/opt/render/project/src/node_modules/mongodb/lib/cursor/abstract_cursor.js:160:45)

Feb 22 05:01:46 PM at AsyncGenerator.next () {

Feb 22 05:01:46 PM [Symbol(errorLabels)]: Set(0) {}

Feb 22 05:01:46 PM}

Hi,

If the service event shows “Deploy failed Exited with status 1”, that’s followed with “Check your service logs for more information.”

What do your logs show?

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.