Skip to content

Commit 2f5b7cb

Browse files
[Fix]: Adjust error message formatting for GraphQL terminating errors to improve clarity
1 parent b61c090 commit 2f5b7cb

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/functions/public/API/Invoke-GitHubGraphQLQuery.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,12 @@ Path: $($errorItem.path -join '/')
7878
foreach ($errorItem in $graphQLResponse.errors) {
7979
$errorMessages += @"
8080
GraphQL terminating errors occurred
81-
Full Error:
82-
$($errorItem | ConvertTo-Json -Depth 10 | Out-String)
83-
8481
Type: $($errorItem.type)
8582
Message: $($errorItem.message)
8683
Path: $($errorItem.path -join '/')
87-
Locations:
88-
$($errorItem.locations | ForEach-Object { " - [$($_.line):$($_.column)] - $($queryLines[$_.line - 1])" })
84+
85+
Full Error:
86+
$($errorItem | ConvertTo-Json -Depth 10 | Out-String)
8987
9088
"@
9189

0 commit comments

Comments
 (0)