diff --git a/lib/internal/mime.js b/lib/internal/mime.js index 0a1d8e7e67916b..07d80a72625cac 100644 --- a/lib/internal/mime.js +++ b/lib/internal/mime.js @@ -70,7 +70,7 @@ function parseTypeAndSubtype(str) { const invalidSubtypeIndex = SafeStringPrototypeSearch(trimmedSubtype, NOT_HTTP_TOKEN_CODE_POINT); if (trimmedSubtype === '' || invalidSubtypeIndex !== -1) { - throw new ERR_INVALID_MIME_SYNTAX('subtype', str, trimmedSubtype); + throw new ERR_INVALID_MIME_SYNTAX('subtype', str, invalidSubtypeIndex); } const subtype = toASCIILower(trimmedSubtype); return [