urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.6k stars 448 forks source link

TypeError: Cannot read properties of undefined (reading 'status') #3330

Closed jvidalv closed 1 year ago

jvidalv commented 1 year ago

Describe the bug

For some unknown reason urql is erroring in this file, and line, sometimes:

@urql+core@4.0.2_graphql@16.6.0/node_modules/@urql/core/dist/urql-core-chunk.mjs

yield makeErrorResult(r, (s.status < 200 || s.status >= 300) && s.statusText ? new Error(s.statusText) : e, s);

Do we have any idea that what could be the cuplrit?

Reproduction

https://grafbase.com

Urql version

urql 4.04

Validations

kitten commented 1 year ago

Just to point this out, the version of urql (the React bindings) isn't relevant here, but, by chance, I can see in your file path that you're on @urql/core@4.0.2.

There's already been a patch for this regression, so if you upgrade it'll be fixed ✌️ https://github.com/urql-graphql/urql/pull/3131

kitten commented 1 year ago

Hiya again :wave: Completely unrelated, but I just took a look at your sourcemaps, since I believe the Grafbase dashboard is what you're working on and I noticed your sourcemaps seem to be publicly accessible ✌️

I'll make it brief, but since it's interesting to me to see how people use urql, since we don't really get a close look that often I did take a quick peek, and I think there's some easy wins here:

Hope this helps! Sorry, I was basically just curious 😄

jvidalv commented 1 year ago
  • @0no-co/graphql.web

Hi Kitten! Thank you very much.

We have done what you mention, upgraded to the latest version of urql and next-urql, but we are still seing this status error (sometimes after a 401).

I don't know if you can point me to any other direction.

Thanks!