aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-01-29 15:52:48 +0100
committerGitHub <[email protected]>2024-01-29 15:52:48 +0100
commit6d3211775f00a8ef087b05594bd6fe251dd0e5b8 (patch)
treedb9db3b9aa58227b6d08620e601b3baddb2c79e1 /src/zenserver
parentexception on basicfile read error (#642) (diff)
downloadzen-6d3211775f00a8ef087b05594bd6fe251dd0e5b8.tar.xz
zen-6d3211775f00a8ef087b05594bd6fe251dd0e5b8.zip
fix response error conversion (#643)
* make sure we properly convert compact-binary results to text when receiving errors * log fix
Diffstat (limited to 'src/zenserver')
-rw-r--r--src/zenserver/projectstore/remoteprojectstore.cpp9
-rw-r--r--src/zenserver/upstream/jupiter.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp
index 099b9ceb3..c85cd1825 100644
--- a/src/zenserver/projectstore/remoteprojectstore.cpp
+++ b/src/zenserver/projectstore/remoteprojectstore.cpp
@@ -1280,9 +1280,10 @@ SaveOplog(CidStore& ChunkStore,
{
if (BaseContainerResult.ErrorCode)
{
- ReportMessage(
- OptionalContext,
- fmt::format("Failed to load oplog base container ({}): {}", BaseContainerResult.ErrorCode, BaseContainerResult.Reason));
+ ReportMessage(OptionalContext,
+ fmt::format("Failed to load oplog base container ({}): {}, uploading all attachments",
+ BaseContainerResult.ErrorCode,
+ BaseContainerResult.Reason));
}
else
{
@@ -1308,7 +1309,7 @@ SaveOplog(CidStore& ChunkStore,
KnownBlocks.push_back({.BlockHash = BlockHash, .ChunksInBlock = std::move(ChunksInBlock)});
};
}
- ReportMessage(OptionalContext, fmt::format("Loading oplog base container in {:.3} s", BaseContainerResult.ElapsedSeconds));
+ ReportMessage(OptionalContext, fmt::format("Loaded oplog base container in {:.3} s", BaseContainerResult.ElapsedSeconds));
}
}
diff --git a/src/zenserver/upstream/jupiter.cpp b/src/zenserver/upstream/jupiter.cpp
index bfe797712..fe4d31604 100644
--- a/src/zenserver/upstream/jupiter.cpp
+++ b/src/zenserver/upstream/jupiter.cpp
@@ -195,7 +195,7 @@ CloudCacheSession::FinalizeRef(std::string_view Namespace, std::string_view Buck
if (Result.Success)
{
std::string JsonError;
- json11::Json Json = json11::Json::parse(std::string(Response.AsText()), JsonError);
+ json11::Json Json = json11::Json::parse(std::string(Response.ToText()), JsonError);
if (JsonError.empty())
{
json11::Json::array Needs = Json["needs"].array_items();