Skip to content

Commit 3ef774c

Browse files
committed
Simplify error message formatting in path parameter validation.
1 parent af770ba commit 3ef774c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ function validatePathParam(params: ParamMap, key: string) {
181181

182182
if (type !== 'boolean' && type !== 'string' && type !== 'number') {
183183
throw new TypeError(
184-
`Path parameter ${key} cannot be of type ${type}. ` +
185-
'Allowed types are: boolean, string, number.',
184+
`Path parameter ${key} cannot be of type ${type}. Allowed types are: boolean, string, number.`,
186185
)
187186
}
188187

0 commit comments

Comments
 (0)