Issue Tracker Failing Last PUT And DELETE Test

Tell us what’s happening:
Live: https://boilerplate-project-issuetracker.dletulle.repl.co
I’ve been messing around with it for a few days, but I’m having trouble understanding why I’m not passing the last PUT and DELETE test. Can anyone see what the issue is?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Issue Tracker

Link to the challenge:

UPDATE: I completed the functional Chai test and even those pass, but those FCC test I mentioned still don’t pass.

Any help would be greatly appreciated.

I was able tof ind the issue on my own while working on the next project, which I was having the same issue.

The problem was after using findById(), I expected that if nothing was found my if (err) res.send(message) would catch it, but apparently when the Id wasn’t found, it was returning null, so I just had to adjust my if statement to be if (err || data === null) res.send(message).

I have another issue on both my projects even though they passed… I don’t know if it’s an issue with repl.it or my project, but when my test are enabled, sometimes they crash the program and sometimes they don’t. I just had to keep restarting it until it would load properly, but I have no idea why this inconsistency happens.

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