diff options
| author | Zousar Shaker <[email protected]> | 2025-09-25 10:52:11 -0600 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-09-25 10:52:11 -0600 |
| commit | ae107e8e7fe1cdf573a93c8d8908592ea671ee51 (patch) | |
| tree | 2accd8ecaa662f3527b7ba6567c07aed8cbe6693 /src/zenstore/cache/structuredcachestore.cpp | |
| parent | 5.7.2-pre2 (diff) | |
| parent | Improvement to Incomplete Result Iteration (diff) | |
| download | zen-ae107e8e7fe1cdf573a93c8d8908592ea671ee51.tar.xz zen-ae107e8e7fe1cdf573a93c8d8908592ea671ee51.zip | |
Merge pull request #509 from ue-foundation/zs/put-overwrite-policy-response
Zs/put overwrite policy response
Diffstat (limited to 'src/zenstore/cache/structuredcachestore.cpp')
| -rw-r--r-- | src/zenstore/cache/structuredcachestore.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp index 3f27e6d21..b58f70ea7 100644 --- a/src/zenstore/cache/structuredcachestore.cpp +++ b/src/zenstore/cache/structuredcachestore.cpp @@ -730,7 +730,9 @@ ZenCacheStore::Put(const CacheRequestContext& Context, if (IsKnownBadBucketName(Bucket)) { m_RejectedWriteCount++; - return PutResult{zen::PutStatus::Invalid, "Bad bucket name"}; + CbObjectWriter DetailWriter; + DetailWriter.AddString("Message", "Bad bucket name"); + return PutResult{zen::PutStatus::Invalid, DetailWriter.Save()}; } ZEN_MEMSCOPE(GetCacheStoreTag()); @@ -777,7 +779,10 @@ ZenCacheStore::Put(const CacheRequestContext& Context, Namespace, Bucket, HashKey.ToHexString()); - return PutResult{zen::PutStatus::Fail, fmt::format("Unknown namespace '{}'", Namespace)}; + + CbObjectWriter DetailWriter; + DetailWriter.AddString("Message", fmt::format("Unknown namespace '{}'", Namespace)); + return PutResult{zen::PutStatus::Fail, DetailWriter.Save()}; } bool |