mirror of https://gitee.com/bigwinds/arangodb
Log action errors to the outside only when in MAINTAINER_MODE
but do always log to the logfile
This commit is contained in:
parent
bc1c2127e0
commit
bbd3728b08
|
@ -917,6 +917,9 @@ static TRI_action_result_t ExecuteActionVocbase(
|
||||||
if (tryCatch.CanContinue()) {
|
if (tryCatch.CanContinue()) {
|
||||||
response->setResponseCode(rest::ResponseCode::SERVER_ERROR);
|
response->setResponseCode(rest::ResponseCode::SERVER_ERROR);
|
||||||
|
|
||||||
|
std::string jsError = TRI_StringifyV8Exception(isolate, &tryCatch);
|
||||||
|
LOG_TOPIC(WARN, arangodb::Logger::V8) << "Caught an error while executing an action: " << jsError;
|
||||||
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
// TODO how to generalize this?
|
// TODO how to generalize this?
|
||||||
if (response->transportType() ==
|
if (response->transportType() ==
|
||||||
Endpoint::TransportType::HTTP) { // FIXME
|
Endpoint::TransportType::HTTP) { // FIXME
|
||||||
|
@ -924,6 +927,7 @@ static TRI_action_result_t ExecuteActionVocbase(
|
||||||
->body()
|
->body()
|
||||||
.appendText(TRI_StringifyV8Exception(isolate, &tryCatch));
|
.appendText(TRI_StringifyV8Exception(isolate, &tryCatch));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
v8g->_canceled = true;
|
v8g->_canceled = true;
|
||||||
result.isValid = false;
|
result.isValid = false;
|
||||||
|
|
Loading…
Reference in New Issue