woocommerce/plugins/woocommerce-blocks/assets/js/base/components
Mike Jolley ca8efd7c3e Add API fetch error handling (https://github.com/woocommerce/woocommerce-blocks/pull/1687)
* initial experiment for fetch error handling

* throw error from api response error (this allows for catching it in the stream)

* Add ERROR action type

* Controls: resolve with an error response object rather than throw exception

* remove try catch from resolver; just yield correct object based on presence of any errors

* Make the use collection hook return an error.

* Small tidy up in use-store-products

* Throw exception from Use Collection - useState is needed for the exception to work inside a hook (see comments)

* Show error code from API in error message

* Update assets/js/base/components/block-error-boundary/block-error.js

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* Update assets/js/base/components/block-error-boundary/style.scss

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* Remove comment

* Handle api error in boundry

* Use reject in promise

* Return error message by default which may be undefined (this is ok)

* Update mocks so tests pass again

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2020-01-31 13:01:34 +00:00
..
block-error-boundary Add API fetch error handling (https://github.com/woocommerce/woocommerce-blocks/pull/1687) 2020-01-31 13:01:34 +00:00
button Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636) 2020-01-31 09:59:14 +13:00
checkbox-list fix translation quantities (https://github.com/woocommerce/woocommerce-blocks/pull/1415) 2019-12-19 10:22:53 +01:00
checkout add fieldset and legend to FormStep component (https://github.com/woocommerce/woocommerce-blocks/pull/1400) 2020-01-13 10:21:20 -05:00
country-input Create CountryInput component (https://github.com/woocommerce/woocommerce-blocks/pull/1585) 2020-01-17 17:58:08 +01:00
dropdown-selector All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
filter-submit-button All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
formatted-monetary-amount show discount on cart line items & price styling (https://github.com/woocommerce/woocommerce-blocks/pull/1548) 2020-01-15 09:52:42 +13:00
input-row Create CountryInput component (https://github.com/woocommerce/woocommerce-blocks/pull/1585) 2020-01-17 17:58:08 +01:00
label Add 'Go' button to Attribute Filter (https://github.com/woocommerce/woocommerce-blocks/pull/1332) 2019-12-06 16:36:55 +01:00
load-more-button Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
pagination All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
payment-methods Add payment method api and components to checkout steps (https://github.com/woocommerce/woocommerce-blocks/pull/1349) 2020-01-06 17:28:09 -05:00
price-slider Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636) 2020-01-31 09:59:14 +13:00
product-list Add API fetch error handling (https://github.com/woocommerce/woocommerce-blocks/pull/1687) 2020-01-31 13:01:34 +00:00
product-list-item Implement useProductLayoutContext for layout prefix in atomic blocks. (https://github.com/woocommerce/woocommerce-blocks/pull/1183) 2019-11-18 15:25:29 +01:00
product-sort-select Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
quantity-selector Add Quantity selector component for cart line items (https://github.com/woocommerce/woocommerce-blocks/pull/1558) 2020-01-15 11:32:54 +00:00
radio-control Make RadioControl id optional (https://github.com/woocommerce/woocommerce-blocks/pull/1563) 2020-01-14 21:21:29 +01:00
read-more Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636) 2020-01-31 09:59:14 +13:00
review-list Use wc_review_ratings_enabled() API function to check if review ratings are enabled (https://github.com/woocommerce/woocommerce-blocks/pull/1374) 2019-12-13 18:13:11 +01:00
review-list-item Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
review-sort-select Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
sort-select Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
tabs Add payment method api and components to checkout steps (https://github.com/woocommerce/woocommerce-blocks/pull/1349) 2020-01-06 17:28:09 -05:00
text-input Make TextInput respect prefers-reduced-motion preference (https://github.com/woocommerce/woocommerce-blocks/pull/1588) 2020-01-18 10:39:13 +01:00
totals Add Cart totals to Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/1411) 2020-01-10 15:37:27 +01:00