#pragma once

#include <util/generic/fwd.h>
#include <mapreduce/yt/interface/errors.h>

namespace NErrorHelpers {
    TString& CutLongMessage(TString& s, size_t limit);
    TString CutYtJobOutput(const TString& s, size_t limit);
    TString& MakeSingleLineShortMessage(TString& s, size_t limit);
    TMaybe<TString> GetFirstNonemptyStderr(const TVector<NYT::TFailedJobInfo>& jobInfos);
    TString ComposeErrorMessage(NYT::IClientBasePtr client, const NYT::TOperationFailedError& error);
}
