Skip to content

Commit 809bc08

Browse files
committed
Put back error message with indentation
1 parent 6358867 commit 809bc08

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/load/src/load-typedefs.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,13 @@ function prepareResult({
148148

149149
export class NoTypeDefinitionsFound extends Error {
150150
constructor(pointerList: string[]) {
151-
const rows: string[] = [];
152-
rows.push('Unable to find any GraphQL type definitions for the following pointers:');
153-
pointerList.forEach(pointer => {
154-
rows.push(`- ${pointer}`);
155-
});
156-
const message = rows.join('\n');
157-
158-
super(message);
151+
super(`
152+
Unable to find any GraphQL type definitions for the following pointers:
153+
${pointerList.map(
154+
p => `
155+
- ${p}
156+
`,
157+
)}`);
159158
this.name = 'NoTypeDefinitionsFound';
160159
}
161160
}

0 commit comments

Comments
 (0)