diff --git a/projects/packages/boost-core/src/lib/class-utils.php b/projects/packages/boost-core/src/lib/class-utils.php index cd24efa116348..52207e115f075 100644 --- a/projects/packages/boost-core/src/lib/class-utils.php +++ b/projects/packages/boost-core/src/lib/class-utils.php @@ -134,8 +134,10 @@ public static function send_wpcom_request( $method, $endpoint, $args = null, $bo ); /* - * WordPress.com passes statusCode and error back from Boost Cloud. - * WordPress.com ISA returns code and message. + * Normalize error responses from WordPress.com. + * + * When WordPress.com returns an error from Boost Cloud, the body contains + * statusCode and error. When it returns a WP_Error, it contains code and message. */ // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase if ( isset( $data['statusCode'] ) && isset( $data['error'] ) ) {