cleanup and tests for InjectError