10#include <library/cpp/yson/node/node.h>
12#include <util/generic/yexception.h>
13#include <util/generic/guid.h>
14#include <util/generic/string.h>
15#include <util/generic/vector.h>
16#include <util/generic/yexception.h>
31 :
public TWithBackTrace<yexception>
71 TYtError(
int code, TString message, TVector<TYtError> inner = {}, TNode::TMapType attributes = {});
145 TVector<TYtError> InnerErrors_;
146 TNode::TMapType Attributes_;
160 TErrorResponse(
TYtError error,
const TString& requestId);
190 bool IsRequestQueueSizeLimitExceeded()
const;
202 bool IsConcurrentOperationsLimitReached()
const;
207 void SetRawError(
const TString& message);
209 void ParseFromJsonError(
const TString& jsonError);
210 void SetIsFromTrailers(
bool isFromTrailers);
218 bool IsFromTrailers_ =
false;
252class TOperationFailedError
281 TOperationId OperationId_;
283 TVector<TFailedJobInfo> FailedJobInfo_;
Error that is thrown when library detects invalid usage of API.
Definition errors.h:32
bool IsAccessDenied() const
Check if error was caused by lack of permissions to execute request.
bool IsChunkUnavailable() const
Check if error was caused by failure to get chunk. Such errors are almost always temporary.
bool IsRequestTimedOut() const
Check if error was caused by internal YT timeout.
bool IsFromTrailers() const
Is error parsed from response trailers.
bool IsResolveError() const
Check if error was caused by failure to resolve cypress path.
const TYtError & GetError() const
Get error object returned by server.
bool IsTransportError() const
Check if error was caused by transport problems inside YT cluster.
bool IsNoSuchTransaction() const
Check if error was caused by trying to work with transaction that was finished or never existed.
bool IsUnauthorized() const
Check if error was caused by authorization issues.
bool IsRequestRateLimitExceeded() const
Check if error was caused by request quota limit exceeding.
TString GetRequestId() const
Get if (correlation-id) of request that was responded with error.
bool IsConcurrentTransactionLockConflict() const
Check if error was caused by failure to lock object because of another transaction is holding lock.
Error that is thrown when operation watched by library fails.
Definition errors.h:254
const TYtError & GetError() const
Return operation error.
TOperationId GetOperationId() const
Get operation id.
const TVector< TFailedJobInfo > & GetFailedJobInfo() const
Return info about failed jobs (if any).
EState
Final state of operation.
Definition errors.h:257
@ Failed
Operation was failed due to some error.
Definition errors.h:259
@ Aborted
Operation didn't experienced errors, but was aborted by user request or by YT.
Definition errors.h:261
EState GetState() const
Get final state of operation.
Error that is thrown when request retries continues for too long.
Definition errors.h:41
Error returned by YT cluster.
Definition errors.h:62
TString ShortDescription() const
Get short description of error.
TYtError(const TString &message)
Constructs error with NYT::NClusterErrorCodes::Generic code and given message.
TString FullDescription() const
Get full description of error.
const TString & GetMessage() const
Get error text of the topmost error.
bool ContainsText(const TStringBuf &text) const
Check if error or any of inner errors contains given text chunk.
const TNode::TMapType & GetAttributes() const
Get error attributes.
bool HasAttributes() const
Check if error has any attributes.
TString GetYsonText() const
Get text yson representation of error.
TYtError()
Constructs error with NYT::NClusterErrorCodes::OK code and empty message.
int GetCode() const
Get error code of the topmost error.
TYtError(const ::NJson::TJsonValue &value)
Construct error from json representation.
TSet< int > GetAllErrorCodes() const
Collect error codes from entire error tree.
TYtError(int code, TString message, TVector< TYtError > inner={}, TNode::TMapType attributes={})
Constructs error from given parameters.
TYtError(const TNode &value)
Construct error from TNode representation.
void ParseFrom(TStringBuf jsonError)
Parse error from json string.
const TVector< TYtError > & InnerErrors() const
Get inner errors.
bool ContainsErrorCode(int code) const
Check if error or any of inner errors has given error code.
Main namespace of YT client.
Definition abortable_stream.h:7
TJobId JobId
Id of a job.
Definition errors.h:229
TYtError Error
Error describing job failure.
Definition errors.h:232
TString Stderr
Definition errors.h:240