From c7eeee59b123abcb0c952e183040f3feb38e4664 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 20 Jun 2014 13:02:02 +0200 Subject: [PATCH] Fixed return codes of traversal api --- js/actions/api-traversal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/actions/api-traversal.js b/js/actions/api-traversal.js index 9da6ceb036..8669215ed5 100644 --- a/js/actions/api-traversal.js +++ b/js/actions/api-traversal.js @@ -571,10 +571,11 @@ function post_api_traversal(req, res) { // ----------------------------------------- if (json.edgeCollection === undefined) { - return badParam(req, res, "missing graphname"); + return badParam(req, res, arangodb.ERROR_GRAPH_NOT_FOUND, + "missing graphname"); } if (typeof json.edgeCollection !== "string") { - return badParam(req, res, "invalid edgecollection"); + return notFound(req, res, "invalid edgecollection"); } try { @@ -592,7 +593,8 @@ function post_api_traversal(req, res) { } else { if (typeof json.graphName !== "string" || !graph._exists(json.graphName)) { - return badParam(req, res, "invalid graphname"); + return notFound(req, res, arangodb.ERROR_GRAPH_NOT_FOUND, + "invalid graphname"); } datasource = traversal.generalGraphDatasourceFactory(json.graphName); }