X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fredis%2Fredisgeneral.cpp;h=5ae8e63d9102f8e208c25c28b700dda8a938b4ed;hb=refs%2Fchanges%2F30%2F1830%2F1;hp=eb837ae05ac988ee944c6d94bf03a190d768e99d;hpb=ef2bf51d04aaf01fa0cabdcaf905b23423067662;p=ric-plt%2Fsdl.git diff --git a/src/redis/redisgeneral.cpp b/src/redis/redisgeneral.cpp index eb837ae..5ae8e63 100644 --- a/src/redis/redisgeneral.cpp +++ b/src/redis/redisgeneral.cpp @@ -14,6 +14,11 @@ limitations under the License. */ +/* + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). +*/ + #include "config.h" #include "private/createlogger.hpp" #include "private/error.hpp" @@ -70,6 +75,9 @@ namespace if (startsWith("ERR Protocol error", rr->str, static_cast(rr->len))) return AsyncRedisCommandDispatcherErrorCode::PROTOCOL_ERROR; + if (startsWith("READONLY", rr->str, static_cast(rr->len))) + return AsyncRedisCommandDispatcherErrorCode::WRITING_TO_SLAVE; + std::ostringstream oss; oss << "redis reply error: " << std::string(rr->str, static_cast(rr->len)); logErrorOnce(oss.str());