use write_error instead of get_error_html

due to changes in tornado 4 for custom error html


see ipython/ipython#6318