From 5311ed41ea6559c31939a79deab8c6030b41cbaf Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 9 Mar 2026 13:09:22 +0000 Subject: [PATCH] Include type in error message --- lib/init-action.js | 2 +- src/feature-flags/properties.test.ts | 2 +- src/feature-flags/properties.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/init-action.js b/lib/init-action.js index 7e59bbb27..b07f684e9 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -104475,7 +104475,7 @@ function setProperty2(properties, name, value, logger) { properties[name] = propertyOptions.parse(name, value, logger); } else { throw new Error( - `Unexpected value for repository property '${name}', got: ${JSON.stringify(value)}` + `Unexpected value for repository property '${name}' (${typeof value}), got: ${JSON.stringify(value)}` ); } } diff --git a/src/feature-flags/properties.test.ts b/src/feature-flags/properties.test.ts index d74d50d4b..86e998de9 100644 --- a/src/feature-flags/properties.test.ts +++ b/src/feature-flags/properties.test.ts @@ -217,7 +217,7 @@ test.serial( ), { message: - /Unexpected value for repository property 'github-codeql-extra-queries', got: 123/, + /Unexpected value for repository property 'github-codeql-extra-queries' \(number\), got: 123/, }, ); }, diff --git a/src/feature-flags/properties.ts b/src/feature-flags/properties.ts index 276bfe501..cb407c308 100644 --- a/src/feature-flags/properties.ts +++ b/src/feature-flags/properties.ts @@ -172,7 +172,7 @@ function setProperty( properties[name] = propertyOptions.parse(name, value, logger); } else { throw new Error( - `Unexpected value for repository property '${name}', got: ${JSON.stringify(value)}`, + `Unexpected value for repository property '${name}' (${typeof value}), got: ${JSON.stringify(value)}`, ); } }