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

Fix: Type error in requestFromUrl #29043

Merged
merged 1 commit into from
Dec 4, 2018
Merged

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Dec 3, 2018

When using requestFromUrl() in #29026 we noticed errors being thrown
from within waitForData(). Investigation revealed this basic type
error that could have been caught by a language and compiler before it
was pushed to production. Yay JS.

This wasn't detected because this function isn't yet being used and we
weren't sure how to test it. Thankfully our fail-fast methodology
prevented this from appearing to our customers.

Testing

Checkout #29026, uncomment the lines in editor/controller.js which add the Jetpack translation files, and load /gutenberg with a non-English locale selected for your account.
In that branch you should discover an error in the dev console after the page load about an unwrapped exception in the promise, it will show { gutenberg, jetpack }

Merge this branch into that PR and reload the page. This time it shouldn't produce that error. Note: I still found an error appear from the /media endpoint but I believe that is unrelated to this code as it comes from somewhere else.

broken-request-from-url mov

When using `requestFromUrl()` in #29026 we noticed errors being thrown
from within `waitForData()`. Investigation revealed this basic type
error that could have been caught by a language and compiler before it
was pushed to production. Yay JS.

This wasn't detected because this function isn't yet being used and we
weren't sure how to test it. Thankfully our fail-fast methodology
prevented this from appearing to our customers.
@dmsnell dmsnell added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Data [Type] Defect labels Dec 3, 2018
@matticbot
Copy link
Contributor

Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

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

Thanks @dmsnell I verified the original issue, and that this change fixes it. See #29026 (comment)
screen shot 2018-12-03 at 5 26 19 pm

@dmsnell dmsnell merged commit 75918df into master Dec 4, 2018
@dmsnell dmsnell deleted the fix/request-from-url-type-error branch December 4, 2018 01:37
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 4, 2018
@tyxla
Copy link
Member

tyxla commented Dec 5, 2018

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants