PLATFORM-392 Correct error code on test failure