tests: add 404 and error handling tests