sindresorhus / ky

🌳 Tiny & elegant JavaScript HTTP client based on the Fetch API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'headers')

EgorEast opened this issue · comments

I am sending the file to the s3 service, but an error occurs with the status 201, but with the response "User not found".

Headers:
image

Preview:
image

The problem is that with such an error, the library issues its own untraceable error
image
What is indicated in sources
image

Sometimes indicates that credentials are not specified

+1, also getting this error atm

Screenshot 2024-04-17 at 1 34 20 PM

Trace stack points to the same line

Screenshot 2024-04-17 at 1 35 06 PM

Was able to get the original error by rewriting the request in fetch, but ideally the error would propagate correctly/wouldn't get eaten by this line

Screenshot 2024-04-17 at 1 45 06 PM

Curious to see how this'll get resolved

The error indicates that you are passing undefined as the first argument to Ky.

Could you please show your code that causes the error?