BS-9831, clean TaskResourceTest
BS-9841, add error code according to exception