Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hapi example] Fix undefined api.statusCode #524

Conversation

GradedJestRisk
Copy link
Contributor

Which problem is this PR solving?

When running hapi client, it exits with message Cannot read property 'ERROR' of undefined

❯ npm run zipkin:client

> hapi-example@0.15.0 client
> cross-env EXPORTER=zipkin node ./client.js

client.js:20
      span.setStatus({ code: api.StatusCode.ERROR, message: e.message });
                                            ^

TypeError: Cannot read property 'ERROR' of undefined
    at client.js:20:45
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

Short description of the changes

Replace non-existing api.StatusCode with api.SpanStatusCode

@GradedJestRisk GradedJestRisk requested a review from a team as a code owner June 7, 2021 13:30
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 7, 2021

CLA Signed

The committers are authorized under a signed CLA.

@GradedJestRisk GradedJestRisk changed the title [Hapi] Fix undefined api.statusCode [Hapi example] Fix undefined api.statusCode Jun 7, 2021
@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #524 (dc5785a) into main (19d5fa4) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
+ Coverage   94.84%   94.86%   +0.02%     
==========================================
  Files         152      149       -3     
  Lines        9226     8957     -269     
  Branches      918      856      -62     
==========================================
- Hits         8750     8497     -253     
+ Misses        476      460      -16     
Impacted Files Coverage Δ
...ry-instrumentation-user-interaction/src/version.ts
...umentation-user-interaction/src/instrumentation.ts
...ation-user-interaction/src/enums/AttributeNames.ts

@vmarchaud vmarchaud merged commit 3250a7c into open-telemetry:main Jun 9, 2021
@dyladan dyladan added the bug Something isn't working label Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants