format error handler code