Skip to content

Commit 8cfcdb5

Browse files
committed
Fix bad syntax in CTA validator integration error call in test
1 parent 0744594 commit 8cfcdb5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/integrations/CtaValidator/componentDiscovery.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ export async function discoverCallToActionComponents(
6565
}
6666
}
6767
} catch (error) {
68-
throw new BuildError({
69-
message: `Failed to read CallToAction components directory '${fullComponentPath}': ${error}`
70-
})
68+
const message = error instanceof Error ? error.message : String(error)
69+
throw new BuildError(`Failed to read CallToAction components directory '${fullComponentPath}': ${message}`)
7170
}
7271

7372
return components

0 commit comments

Comments
 (0)