-
Notifications
You must be signed in to change notification settings - Fork 36
Extract status code when returned as string #642
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
Extract status code when returned as string #642
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case it's already a string, so you can just return the status code itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's just always return resultStatusCode.toString();
if it exists
src/trace/trigger.ts
Outdated
if (typeof resultStatusCode === "number") { | ||
return resultStatusCode.toString(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (typeof resultStatusCode === "number") { | |
return resultStatusCode.toString(); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it as it doesn't do anything special for numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah that's the simplest solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Handles case where the status code is a string instead of a number.
We extract this status code in
extractHTTPStatusCodeTag()
Motivation
#641
Testing Guidelines
Manual+unit
Additional Notes
Types of Changes
Check all that apply