Skip to content

Commit

Permalink
Mention directive name in error
Browse files Browse the repository at this point in the history
  • Loading branch information
jdolle committed Feb 3, 2025
1 parent 78436c8 commit 66dfc13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/libraries/linkable-specs/src/link-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export class FederatedLinkImport {
v.fields.forEach(f => {
if (f.name.value === 'name') {
if (f.value.kind !== Kind.STRING) {
throw new Error(`Expected string value for "name" field but got "${f.value.kind}"`);
throw new Error(`Expected string value for @link "name" field but got "${f.value.kind}"`);
}
name = f.value.value;
} else if (f.name.value === 'as') {
if (f.value.kind !== Kind.STRING) {
throw new Error(`Expected string value for "as" field but got "${f.value.kind}"`);
throw new Error(`Expected string value for @link "as" field but got "${f.value.kind}"`);
}
as = f.value.value;
}
Expand Down

0 comments on commit 66dfc13

Please sign in to comment.