uranusjr commented on code in PR #71144:
URL: https://github.com/apache/airflow/pull/71144#discussion_r3810401102


##########
ts-sdk/src/cli/pack.ts:
##########
@@ -129,9 +129,15 @@ function readBundleManifest(bundlePath: string): 
BundleManifest {
       maxBuffer: MANIFEST_MAX_BUFFER_BYTES,
     });
   } catch (error) {
-    throw new Error(`Running the bundle with ${AIRFLOW_METADATA_FLAG} failed: 
${String(error)}`, {
-      cause: error,
-    });
+    const stderr = (error as { stderr?: string }).stderr ?? "";
+    const reported = stderr
+      .split("\n")
+      .find((line) => /^\w*Error: /.test(line.trim()))
+      ?.trim();

Review Comment:
   This takes the first match, but I think we should take the last instead.
   
   Note that the process for stdout below uses a `reverse` to find the last 
instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to