This will improve the error message shown when monitoring fails. Instead
of showing "Error while monitoring variant analysis: Not Found", this
will now show "Error while monitoring variant analysis "Empty block
(javascript) [29/3/2023 10:45:10]: Not Found". This should make it
easier for the user to figure out which query history item is
problematic.

We're not using the full query history item label here because that
would require access to the query history item, which we don't yet have
here. Adding it here would add a dependency on the query history, which
seems undesirable.
This commit is contained in:
Koen Vlaswinkel 2023-03-29 14:43:07 +02:00
Родитель e6efac0a92
Коммит b06d935256
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1,4 +1,4 @@
import { EventEmitter } from "vscode";
import { env, EventEmitter } from "vscode";
import { getVariantAnalysis } from "./gh-api/gh-api-client";
import {
@ -57,7 +57,11 @@ export class VariantAnalysisMonitor extends DisposableObject {
);
} catch (e) {
void showAndLogWarningMessage(
`Error while monitoring variant analysis: ${getErrorMessage(e)}`,
`Error while monitoring variant analysis ${
variantAnalysis.query.name
} (${variantAnalysis.query.language}) [${new Date(
variantAnalysis.executionStartTime,
).toLocaleString(env.language)}]: ${getErrorMessage(e)}`,
);
continue;
}