1
0
Fork 0

added handleSimpleError for database not found

This commit is contained in:
a-brandt 2016-08-15 17:05:35 +02:00
parent e511cd4ab9
commit 758cc8c985
1 changed files with 10 additions and 3 deletions

View File

@ -360,11 +360,18 @@ bool VppCommTask::processRead() {
<< "got request:" << message._header.toJson();
_request = new VppRequest(_connectionInfo, std::move(message));
GeneralServerFeature::HANDLER_FACTORY->setRequestContext(_request);
_request->setClientTaskId(_taskId);
_protocolVersion = _request->protocolVersion();
executeRequest(_request,
if (_request->requestContext() == nullptr) {
handleSimpleError(GeneralResponse::ResponseCode::NOT_FOUND, TRI_ERROR_ARANGO_DATABASE_NOT_FOUND,
TRI_errno_string(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND));
}
else {
_request->setClientTaskId(_taskId);
_protocolVersion = _request->protocolVersion();
executeRequest(_request,
new VppResponse(GeneralResponse::ResponseCode::SERVER_ERROR,
chunkHeader._messageID));
}
}
if (read_maybe_only_part_of_buffer) {