Search for invalid database name or doc id throws error