Skip to content

Commit

Permalink
fix(notebook): More specific error in query inspector (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Catalin-web authored Oct 2, 2024
1 parent 860a1cc commit 90bb8e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/datasources/notebook/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class DataSource extends DataSourceApi<NotebookQuery, NotebookDataSourceO
throw new Error('The output for the notebook does not match the expected SystemLink format.');
}
} else {
throw new Error('The notebook failed to execute.');
throw new Error(`Notebook execution failed with status: ${execution.status} and error code: ${execution.errorCode}. Exception: ${execution.exception}.`);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/datasources/notebook/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export interface Execution {
status: 'QUEUED' | 'IN_PROGRESS' | 'FAILED' | 'SUCCEEDED' | 'CANCELED' | 'TIMED_OUT';
result: any;
cachedResult: boolean;
exception: string | undefined;
errorCode: "NO_ERROR" | "NOTEBOOK_ERROR" | "NOTEBOOK_TIMEOUT_ERROR" | "NOTEBOOK_NOT_FOUND_ERROR" | "NOTEBOOK_RESULT_TOO_BIG_ERROR" | "NOT_PUBLISHED_ERROR" | "OUT_OF_MEMORY_ERROR" | "UNKNOWN_ERROR" | undefined;
}

export enum ExecutionPriority {
Expand Down

0 comments on commit 90bb8e9

Please sign in to comment.