Skip to content

Commit 404fc51

Browse files
authored
Log graphQL error codes (#5872)
Part of #5808
1 parent 110c909 commit 404fc51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/github/githubRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class GitHubRepository implements vscode.Disposable {
256256
try {
257257
rsp = await gql.query<T>(query);
258258
} catch (e) {
259-
Logger.error(`Error querying GraphQL API: ${e.message}`, GitHubRepository.ID);
259+
Logger.error(`Error querying GraphQL API: ${e.message}${e.graphQLErrors ? `. ${(e.graphQLErrors as GraphQLError[]).map(error => error.extensions?.code).join(',')}` : ''}`, GitHubRepository.ID);
260260
if (legacyFallback) {
261261
query.query = legacyFallback.query;
262262
return this.query(query, ignoreSamlErrors);

0 commit comments

Comments
 (0)