@@ -395,7 +395,7 @@ void RestAqlHandler::createQueryFromVelocyPack() {
395
395
bool success = false ;
396
396
VPackSlice querySlice = this ->parseVPackBody (success);
397
397
if (!success) {
398
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
398
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
399
399
<< " invalid VelocyPack plan in query" ;
400
400
return ;
401
401
}
@@ -404,7 +404,7 @@ void RestAqlHandler::createQueryFromVelocyPack() {
404
404
405
405
VPackSlice plan = querySlice.get (" plan" );
406
406
if (plan.isNone ()) {
407
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
407
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
408
408
<< " Invalid VelocyPack: \" plan\" attribute missing." ;
409
409
generateError (rest::ResponseCode::BAD, TRI_ERROR_INTERNAL,
410
410
" body must be an object with attribute \" plan\" " );
@@ -429,13 +429,13 @@ void RestAqlHandler::createQueryFromVelocyPack() {
429
429
try {
430
430
query->prepare (_queryRegistry);
431
431
} catch (std::exception const & ex) {
432
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
432
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
433
433
<< " failed to instantiate the query: " << ex.what ();
434
434
generateError (rest::ResponseCode::BAD, TRI_ERROR_QUERY_BAD_JSON_PLAN,
435
435
ex.what ());
436
436
return ;
437
437
} catch (...) {
438
- LOG_TOPIC (ERR, arangodb::Logger::FIXME ) << " failed to instantiate the query" ;
438
+ LOG_TOPIC (ERR, arangodb::Logger::AQL ) << " failed to instantiate the query" ;
439
439
generateError (rest::ResponseCode::BAD, TRI_ERROR_QUERY_BAD_JSON_PLAN, " failed to instantiate the query" );
440
440
return ;
441
441
}
@@ -448,7 +448,7 @@ void RestAqlHandler::createQueryFromVelocyPack() {
448
448
_queryRegistry->insert (_qId, query.get (), ttl, true , false );
449
449
query.release ();
450
450
} catch (...) {
451
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
451
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
452
452
<< " could not keep query in registry" ;
453
453
generateError (rest::ResponseCode::BAD, TRI_ERROR_INTERNAL, " could not insert query into registry" );
454
454
return ;
@@ -532,13 +532,13 @@ RestStatus RestAqlHandler::useQuery(std::string const& operation,
532
532
} catch (arangodb::basics::Exception const & ex) {
533
533
generateError (rest::ResponseCode::SERVER_ERROR, ex.code (), ex.what ());
534
534
} catch (std::exception const & ex) {
535
- LOG_TOPIC (ERR, arangodb::Logger::FIXME ) << " failed during use of Query: "
536
- << ex.what ();
535
+ LOG_TOPIC (ERR, arangodb::Logger::AQL ) << " failed during use of Query: "
536
+ << ex.what ();
537
537
538
538
generateError (rest::ResponseCode::SERVER_ERROR, TRI_ERROR_HTTP_SERVER_ERROR,
539
539
ex.what ());
540
540
} catch (...) {
541
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
541
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
542
542
<< " failed during use of Query: Unknown exception occurred" ;
543
543
544
544
generateError (rest::ResponseCode::SERVER_ERROR, TRI_ERROR_HTTP_SERVER_ERROR,
@@ -564,15 +564,19 @@ RestStatus RestAqlHandler::execute() {
564
564
} else if (suffixes[0 ] == " setup" ) {
565
565
setupClusterQuery ();
566
566
} else {
567
- LOG_TOPIC (ERR, arangodb::Logger::FIXME) << " Unknown POST API" ;
568
- generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, " Unknown API" );
567
+ std::string msg (" Unknown POST API: " );
568
+ msg += arangodb::basics::StringUtils::join (suffixes, ' /' );
569
+ LOG_TOPIC (ERR, arangodb::Logger::AQL) << msg;
570
+ generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, std::move (msg));
569
571
}
570
572
break ;
571
573
}
572
574
case rest::RequestType::PUT: {
573
575
if (suffixes.size () != 2 ) {
574
- LOG_TOPIC (ERR, arangodb::Logger::FIXME) << " unknown PUT API" ;
575
- generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, " unknown PUT API" );
576
+ std::string msg (" Unknown PUT API: " );
577
+ msg += arangodb::basics::StringUtils::join (suffixes, ' /' );
578
+ LOG_TOPIC (ERR, arangodb::Logger::AQL) << msg;
579
+ generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, std::move (msg));
576
580
} else {
577
581
auto status = useQuery (suffixes[0 ], suffixes[1 ]);
578
582
if (status == RestStatus::WAITING) {
@@ -585,8 +589,10 @@ RestStatus RestAqlHandler::execute() {
585
589
// in 3.3, the only GET API was /_api/aql/hasMore. Now, there is none in 3.4.
586
590
// we need to keep the old route for compatibility with 3.3 however.
587
591
if (suffixes.size () != 2 || suffixes[0 ] != " hasMore" ) {
588
- LOG_TOPIC (ERR, arangodb::Logger::FIXME) << " Unknown GET API: " << suffixes;
589
- generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, " Unknown GET API" );
592
+ std::string msg (" Unknown GET API: " );
593
+ msg += arangodb::basics::StringUtils::join (suffixes, ' /' );
594
+ LOG_TOPIC (ERR, arangodb::Logger::AQL) << msg;
595
+ generateError (rest::ResponseCode::NOT_FOUND, TRI_ERROR_HTTP_NOT_FOUND, std::move (msg));
590
596
} else {
591
597
// for /_api/aql/hasMore, now always return with a hard-coded response
592
598
// that contains "hasMore" : true. This seems good enough to ensure
@@ -855,7 +861,7 @@ std::shared_ptr<VPackBuilder> RestAqlHandler::parseVelocyPackBody() {
855
861
VPackSlice tmp = body->slice ();
856
862
if (!tmp.isObject ()) {
857
863
// Validate the input has correct format.
858
- LOG_TOPIC (ERR, arangodb::Logger::FIXME )
864
+ LOG_TOPIC (ERR, arangodb::Logger::AQL )
859
865
<< " body of request must be a VelocyPack object" ;
860
866
generateError (rest::ResponseCode::BAD, TRI_ERROR_HTTP_BAD_PARAMETER,
861
867
" body of request must be a VelcoyPack object" );
0 commit comments