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

Update QueryFailed error to include failure info. #96

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

bh2smith
Copy link
Collaborator

@bh2smith bh2smith commented Sep 30, 2023

When attempting to query a parameterized address with invalid string data we get error responses like:

export JOB_ID=01HBJFT6X600Z00VAJQFA9HQ5N
➜  ~ curl -X GET "https://api.dune.com/api/v1/execution/${JOB_ID}/results" -H x-dune-api-key:${DUNE_API_KEY}
{
  "execution_id": "01HBJFT6X600Z00VAJQFA9HQ5N",
  "query_id": 1416166,
  "state": "QUERY_STATE_FAILED",
  "submitted_at": "2023-09-30T07:28:27.558928Z",
  "expires_at": "2023-12-29T07:28:27.751448Z",
  "execution_started_at": "2023-09-30T07:28:27.564121Z",
  "execution_ended_at": "2023-09-30T07:28:27.751447Z",
  "error": {
    "type": "FAILED_TYPE_EXECUTION_FAILED",
    "message": "line 24:13: Binary literal can only contain hexadecimal digits at line 24, position 13 [Execution ID: 01HBJFT6X600Z00VAJQFA9HQ5N]",
    "metadata": {
      "line": 24,
      "column": 13
    }
  }
}

Which contain clear error message. This was not an issue before when using spark because spark used strings for binary data.

This PR improves the error notification by actually returning the error.

@bh2smith bh2smith requested a review from msf September 30, 2023 08:03
@bh2smith bh2smith merged commit d97bc15 into main Oct 10, 2023
3 checks passed
@RichardKeo RichardKeo deleted the update-failure-notice branch February 19, 2024 09:30
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.

2 participants