Skip to content

Commit d2b50a5

Browse files
committed
Print function names on validation errors, not [Object object]
1 parent e562e58 commit d2b50a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/deploy/functions/validate.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function functionIdsAreValid(functions: { id: string; platform: string }[
3838
});
3939
if (invalidV1Ids.length !== 0) {
4040
const msg =
41-
`${invalidV1Ids.join(", ")} function name(s) can only contain letters, ` +
41+
`${invalidV1Ids.map((f) => f.id).join(", ")} function name(s) can only contain letters, ` +
4242
`numbers, hyphens, and not exceed 62 characters in length`;
4343
throw new FirebaseError(msg);
4444
}
@@ -49,7 +49,7 @@ export function functionIdsAreValid(functions: { id: string; platform: string }[
4949
});
5050
if (invalidV2Ids.length !== 0) {
5151
const msg =
52-
`${invalidV2Ids.join(", ")} v2 function name(s) can only contin lower ` +
52+
`${invalidV2Ids.map((f) => f.id).join(", ")} v2 function name(s) can only contin lower ` +
5353
`case letters, numbers, hyphens, and not exceed 62 characters in length`;
5454
throw new FirebaseError(msg);
5555
}

0 commit comments

Comments
 (0)