@@ -326,6 +326,20 @@ var HttpClient = class {
}
if (response.status < 200 || response.status >= 300) {
const body = await response.text();
+ // Debug aid: log non-2xx responses to trace publish failures (e.g., 400) with context
+ try {
+ console.error(
+ "[upstash-qstash] request failed",
+ JSON.stringify({
+ status: response.status,
+ url: response.url,
+ headers: Object.fromEntries(response.headers.entries()),
+ body
+ })
+ );
+ } catch {
+ // ignore logging failures to preserve original throw path
+ }
throw new QstashError(
body.length > 0 ? body : `Error: status=${response.status}`,
response.status
@@ -1841,8 +1855,10 @@ var AutoExecutor = class _AutoExecutor {
if (error instanceof QStashWorkflowAbort) {
throw error;
}
+
+ const errorMessage = error instanceof Error ? error.message : typeof error === "object" ? JSON.stringify(error) : String(error);
throw new QStashWorkflowError(
- `Error submitting steps to QStash in partial parallel step execution: ${error}`
+ `Error submitting steps to QStash in partial parallel step execution: ${errorMessage}`
);
}
break;