From 4a83aab034e989adbaf2dc9f643077e513d1ca20 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:19:49 +0100 Subject: [PATCH] feat(core): add typed error handling to main run function --- src/main.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c57a8be..4c5a75d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1 +1,12 @@ -export async function run(): Promise {} +import * as core from "@actions/core"; + +export async function run(): Promise { + try { + } catch (error: unknown) { + if (error instanceof Error) { + core.setFailed(error.message); + } else { + core.setFailed("An unexpected error occurred"); + } + } +}