mirror of https://gitee.com/bigwinds/arangodb
Improve syncer error message (#10404)
(cherry picked from commit 0a04067153356e035be35f42e890c7a02592985c)
This commit is contained in:
parent
413a81fba9
commit
4ddc94fac9
|
@ -640,6 +640,8 @@ Result parseResponse(velocypack::Builder& builder,
|
|||
velocypack::Parser parser(builder);
|
||||
parser.parse(response->getBody().begin(), response->getBody().length());
|
||||
return Result();
|
||||
} catch (VPackException const& e) {
|
||||
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE, e.what());
|
||||
} catch (...) {
|
||||
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE);
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ Result syncChunkRocksDB(DatabaseInitialSyncer& syncer, SingleCollectionTransacti
|
|||
if (r.fail()) {
|
||||
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
|
||||
std::string("got invalid response from master at ") +
|
||||
syncer._state.master.endpoint + ": response is no array");
|
||||
syncer._state.master.endpoint + ": " + r.errorMessage());
|
||||
}
|
||||
|
||||
VPackSlice const responseBody = builder.slice();
|
||||
|
@ -425,7 +425,7 @@ Result syncChunkRocksDB(DatabaseInitialSyncer& syncer, SingleCollectionTransacti
|
|||
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
|
||||
std::string("got invalid response from master at ") +
|
||||
syncer._state.master.endpoint +
|
||||
": response is no array");
|
||||
": " + r.errorMessage());
|
||||
}
|
||||
|
||||
VPackSlice const slice = docsBuilder->slice();
|
||||
|
@ -613,7 +613,7 @@ Result handleSyncKeysRocksDB(DatabaseInitialSyncer& syncer,
|
|||
if (r.fail()) {
|
||||
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
|
||||
std::string("got invalid response from master at ") +
|
||||
syncer._state.master.endpoint + ": response is no array");
|
||||
syncer._state.master.endpoint + ": " + r.errorMessage());
|
||||
}
|
||||
|
||||
VPackSlice const chunkSlice = builder.slice();
|
||||
|
|
Loading…
Reference in New Issue