diff --git a/plugins/woocommerce-blocks/assets/js/data/utils/process-error-response.ts b/plugins/woocommerce-blocks/assets/js/data/utils/process-error-response.ts index 8e4b425b538..2ab072b08ac 100644 --- a/plugins/woocommerce-blocks/assets/js/data/utils/process-error-response.ts +++ b/plugins/woocommerce-blocks/assets/js/data/utils/process-error-response.ts @@ -13,6 +13,11 @@ import { } from '@woocommerce/types'; import { noticeContexts } from '@woocommerce/base-context/event-emit/utils'; +/** + * Internal dependencies + */ +import { processNotices } from './process-notices'; + type ApiParamError = { param: string; id: string; @@ -195,6 +200,10 @@ export const processErrorResponse = ( return; } + if ( response.data?.notices ) { + processNotices( response.data?.notices ); + } + if ( response.code === 'rest_invalid_param' ) { return processInvalidParamResponse( response, context ); }