1
0
Fork 0

Improve an error message, add httpStatus and reformat. (#3837)

This commit is contained in:
Max Neunhöffer 2017-11-29 11:18:49 +01:00 committed by GitHub
parent 816f74d9af
commit 5e7bfaf24b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -1323,10 +1323,12 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
LOG_TOPIC(ERR, Logger::CLUSTER) << "Could not get agency dump!";
}
} else {
errorMsg += std::string("\n") + __FILE__ + std::to_string(__LINE__);
errorMsg += std::string("\n") + res.errorMessage();
errorMsg += std::string("\n") + res.errorDetails();
errorMsg += std::string("\n") + res.body();
errorMsg += std::string("file: ") + __FILE__ +
" line: " + std::to_string(__LINE__);
errorMsg += " HTTP code: " + std::to_string(res.httpCode());
errorMsg += " error message: " + res.errorMessage();
errorMsg += " error details: " + res.errorDetails();
errorMsg += " body: " + res.body();
events::CreateCollection(
name, TRI_ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN);
return TRI_ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN;