Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error string returned for missing vertex collections #11730

Open
ex-nerd opened this issue May 31, 2020 · 0 comments
Open

Incorrect error string returned for missing vertex collections #11730

ex-nerd opened this issue May 31, 2020 · 0 comments
Assignees
Labels
1 Analyzing 3 API HTTP / Driver API related 3 Graph Graph query engine

Comments

@ex-nerd
Copy link

ex-nerd commented May 31, 2020

Attempting to insert an edge referencing a missing vertex returns an an error that the edge collection is missing, rather than that the vertex is missing.

My Environment

  • ArangoDB Version: 3.6.1 via official docker
  • Storage Engine: whatever is default
  • Deployment Mode: single
  • Deployment Strategy: official docker via manual command in docker-composearangodb --starter.mode=single --starter.data-dir=/opt/arangodb --starter.address=0.0.0.0
  • Configuration: nothing special
  • Infrastructure: docker-compose local development
  • Operating System: whatever is in your docker image
  • Total RAM in your machine: 32Gb but only 4GB allocated to docker
  • Disks in use: SSD
  • Used Package: nope

Component, Query & Data

Originally thought this was a bug in python arango filed here but it seems this message is coming straight from arangodb. Requoted here with edits based on new info:

Given a graph G that links V_DOCS to itself via edge collection EDGE_DOCS, I accidentally typo'd my link statement in something that looks roughly like this:

# using python-arango
from arango.database import StandardDatabase
db: StandardDatabase = client.db(repo_name, username, password)
g: Graph = db.graph("G")
edges: EdgeCollection = g.edge_collection("EDGE_DOCS")
edges.insert({"_key": "something", "_from": "V_TYPO/1234", "_to": "V_DOCS/3456"})

The error returned looks like this:

arango.exceptions.DocumentInsertError: [HTTP 404][ERR 1203] collection 'EDGE_DOCS' not found

Certainly EDGE_DOCS exists ... what the error should have been telling me is that the vertex referencing V_TYPO doesn't exist.

I originally assumed this was something in python-arango simply receiving a 404 from arangodb and filling in the EDGE_DOCS collection name on its own, but its author assures me that the error is returned verbatim from arangodb.

Steps to reproduce

Described above.

Problem:

Attempting to insert an edge referencing a missing vertex returns an an error that the edge collection is missing, rather than that the vertex is missing.

Expected result:

The error returned should reference the missing vertex, not the edge collection (which does exist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Analyzing 3 API HTTP / Driver API related 3 Graph Graph query engine
Projects
None yet
Development

No branches or pull requests

3 participants