Indent
Add try-catch to generator next callback
Indent
Move code out of try block
Write error message to response and quit