Skip to content

Make fetch instrumentation grab Request.url when passed Request object #934

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

Merged
merged 2 commits into from
Apr 14, 2017

Conversation

LewisJEllis
Copy link
Contributor

Was previously assuming first argument to fetch was always a url string, which is not necessarily the case

Adds failing test and the fix; fixes #924.

@LewisJEllis LewisJEllis requested a review from benvinegar April 14, 2017 18:22
Copy link
Contributor

@benvinegar benvinegar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♠️

if (fetchInput.method) {
method = fetchInput.method;
}
}

if (args[1] && args[1].method) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do want to keep this here; in the case that both a Request object input and an init options object are passed, the init options object's method should override that of the Request object.

@LewisJEllis LewisJEllis merged commit 9e25563 into master Apr 14, 2017
@LewisJEllis LewisJEllis deleted the bug/gh-924 branch April 14, 2017 18:25
@timtyrrell
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Breadcrumb throws an exception when window.fetch is passed a Request object instead of a URL string
3 participants