triggerdotdev/trigger.dev

bug: Retrieve returns: InternalServerError [TriggerApiError]: 500 "Internal Server Error"

Closed this issue · 0 comments

Provide environment information

Run ID: run_dg6jxjwhv4p2m4h2q6ksu
Project ID: proj_bdbxbyiolxnmqbdrenvr

Describe the bug

I tried with the SDK and calling the API directly and both return 500. My environment and secret key settings are correct. I even created a test task with the same outputs/logger, and it works. The only problem is retrieving the run ID I sent above.

Could you check this on your side?

Reproduction repo

https://github.com/triggerdotdev/trigger.dev

To reproduce

"use server";

import { runs } from "@trigger.dev/sdk/v3";

export async function checkTaskStatus(runId: string) {
if (!runId) {
throw new Error("Missing run ID");
}

try {
console.log("trying to retrieve from run id ", runId);

const result = await runs.retrieve(runId);
console.log("result: ", result);

if (result.isSuccess) {
  return {
    status: "success",
    hash: result.output.txHash,
  }
} else if (result.isFailed) return { status: "error" }
else return { status: "pending" }

} catch (error) {
console.error("Error fetching run:", error);
return { status: "error" };
}
}

Additional information

No response