We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5957fd3 commit eab949aCopy full SHA for eab949a
packages/plugins/opentelemetry/src/spans.ts
@@ -296,7 +296,7 @@ export function setGraphQLValidateAttributes(input: {
296
297
const codes = [];
298
for (const error of result) {
299
- if (error.extensions.code) {
+ if (error.extensions?.code) {
300
codes.push(`${error.extensions.code}`);
301
}
302
span.recordException(error);
@@ -388,7 +388,7 @@ export function setGraphQLExecutionResultAttributes(input: {
388
const codes: string[] = [];
389
for (const error of result.errors) {
390
391
- if (error.extensions['code']) {
+ if (error.extensions?.['code']) {
392
codes.push(`${error.extensions['code']}`); // Ensure string using string interpolation
393
394
0 commit comments