[wp-trac] [WordPress Trac] #39314: WP-API Backbone Client: buildModelGetter fails to reject deferred on fetch error

WordPress Trac noreply at wordpress.org
Sun Dec 18 15:31:02 UTC 2016


#39314: WP-API Backbone Client: buildModelGetter fails to reject deferred on fetch
error
---------------------------------------------+-----------------------------
 Reporter:  westonruter                      |       Owner:
     Type:  defect (bug)                     |  adamsilverstein
 Priority:  normal                           |      Status:  assigned
Component:  REST API                         |   Milestone:  4.7.1
 Severity:  normal                           |     Version:  4.7
 Keywords:  has-patch has-unit-tests commit  |  Resolution:
                                             |     Focuses:
---------------------------------------------+-----------------------------
Changes (by adamsilverstein):

 * keywords:  has-patch => has-patch has-unit-tests commit


Comment:

 Thanks @westonruter - good catch! I went ahead and added an error handler
 for the other get helper builder and a unit test to confirm the behavior
 for `getAuthorUser` in https://github.com/WP-API/client-js/pull/150
 ([https://patch-diff.githubusercontent.com/raw/WP-API/client-
 js/pull/150.diff diff]). Ultimately I would like to expand the unit test
 to cover all helpers. I confirmed the test I wrote fails before your patch
 and passes after it. I will add the test to my patch on #39264 when I get
 these tests into core.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39314#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list