Add extra line about src files are part of RIC platform project
[ric-plt/sdl.git] / src / redis / redisgeneral.cpp
index eb837ae..5ae8e63 100644 (file)
    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<size_t>(rr->len)))
             return AsyncRedisCommandDispatcherErrorCode::PROTOCOL_ERROR;
 
+        if (startsWith("READONLY", rr->str, static_cast<size_t>(rr->len)))
+            return AsyncRedisCommandDispatcherErrorCode::WRITING_TO_SLAVE;
+
         std::ostringstream oss;
         oss << "redis reply error: " << std::string(rr->str, static_cast<size_t>(rr->len));
         logErrorOnce(oss.str());