Hey, does anyone know why this might be happening?...
# prisma-whats-new
m
Hey, does anyone know why this might be happening?
Copy code
{ Error: Network error: Network request failed with status 504 - "Gateway Time-out"
...
FetchError: invalid json response body at <https://api.graph.cool/simple/v1/secret> reason: Unexpected token < in JSON at position 0
Is this happening because of bad request or server error? ๐Ÿ™‚
@nilan? ๐Ÿ˜„
a
When does it happen?
m
I am not sure, but I suppose it happens at server-rendering time.
The logs are very unclear ๐Ÿ˜•
Copy code
{ Error: Network error: Network request failed with status 504 - "Gateway Time-out"
    at new ApolloError (/home/nowuser/src/node_modules/apollo-client/bundle.umd.js:76:28)
    at /home/nowuser/src/node_modules/apollo-client/bundle.umd.js:948:41
    at /home/nowuser/src/node_modules/apollo-client/bundle.umd.js:1326:17
    at Array.forEach (<anonymous>)
    at /home/nowuser/src/node_modules/apollo-client/bundle.umd.js:1325:18
    at Map.forEach (<anonymous>)
    at QueryManager.broadcastQueries (/home/nowuser/src/node_modules/apollo-client/bundle.umd.js:1320:22)
    at /home/nowuser/src/node_modules/apollo-client/bundle.umd.js:897:31
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  graphQLErrors: [],
  networkError: 
   { Error: Network request failed with status 504 - "Gateway Time-out"
    at /home/nowuser/src/node_modules/apollo-link-http/lib/bundle.umd.js:46:25
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
     response: 
      Body {
        url: '<https://api.graph.cool/simple/v1/secret>',
        status: 504,
        statusText: 'Gateway Time-out',
        headers: [Object],
        ok: false,
        body: [Object],
        bodyUsed: true,
        size: 0,
        timeout: 0,
        _raw: [Array],
        _abort: false,
        _bytes: 669 },
     parseError: 
      { FetchError: invalid json response body at <https://api.graph.cool/simple/v1/secreat> reason: Unexpected token < in JSON at position 0
    at /home/nowuser/src/node_modules/node-fetch/lib/body.js:48:31
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
        name: 'FetchError',
        message: 'invalid json response body at <https://api.graph.cool/simple/v1/secret> reason: Unexpected token < in JSON at position 0',
        type: 'invalid-json' },
     statusCode: 504 },
  message: 'Network error: Network request failed with status 504 - "Gateway Time-out"',
  extraInfo: undefined,
  queryErrors: [ [Circular] ] }
w
It might be because of the performance degradation currently for US-West?
n
@matic are you querying lots of data? if the HTTP request takes too long, it times out. I believe the limit is 45 seconds.
m
@nilan no, I donโ€™t think so, because it used to work normaly before. Suppose itโ€™s best to just wait?
n
how exactly are you reproducing this?
m
Actually itโ€™s gone now and I cannot reproduce it ๐Ÿ˜• . I was using Apollo Client and hosted it on
now
, if that helps in any way. ๐Ÿ™‚