added error code to calls to error handlers mapped via error()