@@ -127,26 +127,26 @@ public ObPayload invokeSync(final ObTableConnection conn, final ObPayload reques
127127 "routed to the wrong server: " + response .getMessage ());
128128 logger .warn (errMessage );
129129 if (needFetchAll (resultCode .getRcode (), resultCode .getPcode ())) {
130- throw new ObTableNeedFetchAllException (errMessage );
130+ throw new ObTableNeedFetchAllException (errMessage , resultCode . getRcode () );
131131 } else if (needFetchPartial (resultCode .getRcode ())) {
132- throw new ObTableRoutingWrongException (errMessage );
132+ throw new ObTableRoutingWrongException (errMessage , resultCode . getRcode () );
133133 } else {
134134 // Encountered an unexpected RoutingWrong error code,
135135 // possibly due to the client error code version being behind the observer's version.
136136 // Attempting a full refresh here
137137 // and delegating to the upper-level call to determine whether to throw the exception to the user based on the retry result.
138138 logger .warn ("get unexpected error code: {}" , response .getMessage ());
139- throw new ObTableNeedFetchAllException (errMessage );
139+ throw new ObTableNeedFetchAllException (errMessage , resultCode . getRcode () );
140140 }
141141 }
142142 if (resultCode .getRcode () != 0 && response .getHeader ().getPcode () != Pcodes .OB_TABLE_API_MOVE ) {
143143 String errMessage = TraceUtil .formatTraceMessage (conn , request ,
144144 "routed to the wrong server: " + response .getMessage ());
145145 logger .warn (errMessage );
146146 if (needFetchAll (resultCode .getRcode (), resultCode .getPcode ())) {
147- throw new ObTableNeedFetchAllException (errMessage );
147+ throw new ObTableNeedFetchAllException (errMessage , resultCode . getRcode () );
148148 } else if (needFetchPartial (resultCode .getRcode ())) {
149- throw new ObTableRoutingWrongException (errMessage );
149+ throw new ObTableRoutingWrongException (errMessage , resultCode . getRcode () );
150150 } else {
151151 ExceptionUtil .throwObTableException (conn .getObTable ().getIp (), conn
152152 .getObTable ().getPort (), response .getHeader ().getTraceId1 (), response
0 commit comments