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

DRV-567: query error output should be consistent with fauna web shell #135

Conversation

vadimLF
Copy link
Contributor

@vadimLF vadimLF commented Mar 24, 2021

Based on #83 and https://faunadb.atlassian.net/browse/DRV-567.
When error occurs in web-shell user observes the following error output:

Error: [
  {
    "position": [],
    "code": "call error",
    "description": "Calling the function resulted in an error.",
    "cause": [
      {
        "position": ["expr"],
        "code": "invalid ref",
        "description": "Ref refers to undefined index 'user_ref_by_username'"
      }
    ]
  }
]

the same error output in go driver looks like this:
Response error 400. Errors: [](call error): Calling the function resulted in an error.

which means that go driver does not display cause field.

@vadimLF vadimLF changed the title Drv 567 query error output should be consistent with fauna web shell DRV-567: query error output should be consistent with fauna web shell Mar 24, 2021
Copy link
Contributor

@erickpintor erickpintor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vadimLF
Copy link
Contributor Author

vadimLF commented Apr 2, 2021

Let's put this PR on hold since we want to consolidate errors for all drivers.

@vadimLF vadimLF merged commit c597b86 into fauna:master May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants