Due to the routes being defined in the wrong order, certain urls (e.g. /tasks/:taskid:/edit) are being captured by the results route instead (e.g. /tasks/:taskid:/:resultid:). This is causing the wrong method to being called with parts of the path like edit, run, etc. being passed as an argument to ObjectID(). As these are not valid MongoDB IDs, the method displays instead an error message:
Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Also change the path to the favicon image to be not relative, as this is causing a favicon.png string to be sent as an argument to ObjectID() when visiting certain pages due to the previous issue.
Due to the routes being defined in the wrong order, certain urls (e.g.
/tasks/:taskid:/edit
) are being captured by the results route instead (e.g./tasks/:taskid:/:resultid:
). This is causing the wrong method to being called with parts of the path likeedit
,run
, etc. being passed as an argument to ObjectID(). As these are not valid MongoDB IDs, the method displays instead an error message:Also change the path to the favicon image to be not relative, as this is causing a
favicon.png
string to be sent as an argument to ObjectID() when visiting certain pages due to the previous issue.