[YARN] properly set diagnostics messages on failures