Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url not checked #2366

Closed
2 tasks done
Richienb opened this issue Jul 16, 2024 · 0 comments · Fixed by #2367
Closed
2 tasks done

Url not checked #2366

Richienb opened this issue Jul 16, 2024 · 0 comments · Fixed by #2367
Labels
enhancement This change will extend Got features good for beginner This issue is easy to fix ✭ help wanted ✭

Comments

@Richienb
Copy link
Contributor

Richienb commented Jul 16, 2024

Describe the bug

  • Node.js version: 20.12.1
  • OS & version: Windows 11 22631.3880

Took me a few minutes to realise the nonsense error was caused by me passing the false output from a failing prior process.

Actual behavior

file:///[...]/got/dist/source/create.js:36
            request._noPipe = !normalized.isStream;
                                          ^

TypeError: Cannot read properties of undefined (reading 'isStream')

Expected behavior

TypeError: url must be a string

Code to reproduce

import got from 'got';

await got(false);

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This change will extend Got features good for beginner This issue is easy to fix ✭ help wanted ✭
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants