Added error handling to notebook visualization API

Throw 404 for notebook or var not found and
500 for python errors in the notebook