pass error objects to handler