-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
Cannot reuse an options object #1118
Comments
Please make another example using |
Unless this is a bug, the error says that you're trying to pass a |
I see you're using a |
So I may be calling it incorrectly, because I have been trying different things. The version of Got I have is Furthermore, the strange part is it is just that url that does not work, copy and pasting other URLs into the same method works. Additionally, copy and pasting that url into postman does work |
I cannot reproduce: https://runkit.com/szmarczak/5e6aaf0ebe09fd001a74aacb |
Right, that's exactly my point - I cannot consistently reproduce the error across multiple URLs - it only happens with that one implementation. I am a little confused by the error itself: It sounds to me like the error is saying: Any chance you could help with some clarity on that? I am not trying to be difficult, just trying my best to troubleshoot! |
It says what it literally says, you cannot provide both an input argument and a URL option. Or maybe Got adds a It isn't possible to occur randomly as it is normalisation-based. Here's an example of an input argument:
Here's an example of a
Got basically says that it has received
|
Got sets got/source/normalize-arguments.ts Line 297 in f726390
|
url
option cannot be used if the input is a valid URL.
I'll fix this later today, need to get some sleep now. |
I wanted to follow up that I wasn't able to figure it out, unfortunately, and I switched to using |
Describe the bug
When trying to make an API call, I am getting the following error:
(node:73533) UnhandledPromiseRejectionWarning: TypeError: The
urloption cannot be used if the input is a valid URL.
. When I copy and paste the exact URL being tried into Postman, it works fineActual behavior
The error is being thrown and the API call is not being made.
...
Expected behavior
The API would be made.
...
Code to reproduce
Unfortunately, I cannot give an entirely repoduceable code snippet, because it requires a personal API key, but I believe the problem happens before the request is actually made. This is the code used to made the call:
Checklist
The text was updated successfully, but these errors were encountered: