Personal Library - I keep getting Uncaught Assertion Error

Hi everyone, working on the Personal Library here:

I’m able to connect to my database but in all my tests, I keep getting an “Uncaught AssertionError: expected 404 to equal 400” for every single test question in my console.

I’ve been spinning my wheels a bit. Just wondering if anyone is able to see something glaringly obvious that I’m missing?

Glitch Project Code:

All tests have errors like this…

Uncaught AssertionError: expected 404 to equal 200

  • expected - actual

-404 +200

at chai.request.get.send.send.end (tests/2_functional-tests.js:133:19)

at Test.Request.callback (/rbd/pnpm-volume//node_modules/

at IncomingMessage.parser (/rbd/pnpm-volume//node_modules/

at endReadableNT (_stream_readable.js:1125:12)

at process._tickCallback (internal/process/next_tick.js:63:19)

I realized I was connecting to MongoDB once within the exported function. It was fixed by connecting to MongoDB within each GET, POST, DELETE request.