Skip to content

Commit

Permalink
[Hapi example] Fix undefined api.statusCode (#524)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
  • Loading branch information
GradedJestRisk and vmarchaud committed Jun 9, 2021
1 parent 19d5fa4 commit 3250a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/hapi/client.js
Expand Up @@ -14,10 +14,10 @@ function makeRequest() {
api.context.with(api.trace.setSpan(api.ROOT_CONTEXT, span), async () => {
try {
const res = await axios.get('http://localhost:8081/run_test');
span.setStatus({ code: api.StatusCode.OK });
span.setStatus({ code: api.SpanStatusCode.OK });
console.log(res.statusText);
} catch (e) {
span.setStatus({ code: api.StatusCode.ERROR, message: e.message });
span.setStatus({ code: api.SpanStatusCode.ERROR, message: e.message });
}
span.end();
console.log('Sleeping 5 seconds before shutdown to ensure all records are flushed.');
Expand Down

0 comments on commit 3250a7c

Please sign in to comment.