(1) fix a bug where missing IDs didn't throw the correct error; (2) fix a bug where mongodb collection names were incorrectly extracted from the url