Error is null, not undefined.
Rename "deferral" to "task".