add tests for errors processing