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

Revamp Messaging of QueryFailed #89

Open
bh2smith opened this issue Sep 8, 2023 · 0 comments
Open

Revamp Messaging of QueryFailed #89

bh2smith opened this issue Sep 8, 2023 · 0 comments

Comments

@bh2smith
Copy link
Collaborator

bh2smith commented Sep 8, 2023

Currently the error messaging naively outputs "Perhaps your query took too long to run" which is only one of many reasons a query execution could fail.

Here is an example of a failing query whose last execution has JOB_ID=01H9STYJ63ETQKCQ8PVG3NMREM.

{
  "execution_id": "01H9STYJ63ETQKCQ8PVG3NMREM",
  "query_id": 3008125,
  "state": "QUERY_STATE_FAILED",
  "submitted_at": "2023-09-08T07:26:21.893177Z",
  "expires_at": "2023-12-07T07:26:22.095658Z",
  "execution_started_at": "2023-09-08T07:26:21.907079Z",
  "execution_ended_at": "2023-09-08T07:26:22.095657Z",
  "error": {
    "type": "FAILED_TYPE_EXECUTION_FAILED",
    "message": "line 1:1: mismatched input 'selcjthehg'. Expecting: 'ALTER', 'ANALYZE', 'CALL', 'COMMENT', 'COMMIT', 'CREATE', 'DEALLOCATE', 'DELETE', 'DENY', 'DESC', 'DESCRIBE', 'DROP', 'EXECUTE', 'EXPLAIN', 'GRANT', 'INSERT', 'MERGE', 'PREPARE', 'REFRESH', 'RESET', 'REVOKE', 'ROLLBACK', 'SET', 'SHOW', 'START', 'TRUNCATE', 'UPDATE', 'USE', <query> at line 1, position 1 [Execution ID: 01H9STYJ63ETQKCQ8PVG3NMREM]",
    "metadata": {
      "line": 1,
      "column": 1
    }
  }
}

We could build the QueryFailed error type out of ExecutionResponse["error"].

Originally posted by @RichardKeo in #72 (comment)

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

No branches or pull requests

1 participant