aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexnick <alexnick@ydb.tech>2023-06-20 15:12:51 +0300
committeralexnick <alexnick@ydb.tech>2023-06-20 15:12:51 +0300
commitd7085d111194ac1be48f9fb0c61b987e93b282c5 (patch)
tree705b15b8c9f3a5a2345f0d8cd760449dbf634e6a
parentd72d3725bf30350da6b32682f936dc20f6b984eb (diff)
downloadydb-d7085d111194ac1be48f9fb0c61b987e93b282c5.tar.gz
adding error message for response
return error message
-rw-r--r--ydb/services/datastreams/put_records_actor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/ydb/services/datastreams/put_records_actor.h b/ydb/services/datastreams/put_records_actor.h
index 6ac29cc524..917c9b0701 100644
--- a/ydb/services/datastreams/put_records_actor.h
+++ b/ydb/services/datastreams/put_records_actor.h
@@ -516,10 +516,11 @@ namespace NKikimr::NDataStreams::V1 {
if (putRecordsResult.records(0).error_code() == "ProvisionedThroughputExceededException"
|| putRecordsResult.records(0).error_code() == "ThrottlingException")
{
- return ReplyWithResult(Ydb::StatusIds::OVERLOADED, ctx);
+ return ReplyWithError(Ydb::StatusIds::OVERLOADED, Ydb::PersQueue::ErrorCode::OVERLOAD, putRecordsResult.records(0).error_message(), ctx);
}
//TODO: other codes - access denied and so on
- return ReplyWithResult(Ydb::StatusIds::INTERNAL_ERROR, ctx);
+ return ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, Ydb::PersQueue::ErrorCode::ERROR, putRecordsResult.records(0).error_message(), ctx);
+
}
}