Hello, For fga.check method, sometimes we are gett...
# ask-a-descoper
a
Hello, For fga.check method, sometimes we are getting this error, any clue?
```FetchError: request to https://api.descope.com/v1/mgmt/fga/check failed, reason:
at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js150111)
at ClientRequest.emit (nodeevents519:28)
at emitErrorEvent (node http client101:11)
at TLSSocket.socketErrorListener (node http client504:5)
at TLSSocket.emit (nodeevents519:28)
at emitErrorNT (nodeinternal/streams/destroy169:8)
at emitErrorCloseNT (nodeinternal/streams/destroy128:3)
at process.processTicksAndRejections (nodeinternal/process/task queues82:21)```
m
can you provide the cf-ray header from response ?
a
I didnt receieve an response, when i try to check fga.check method from node sdk, got above error. and this is not frequent. wanted to check what would be the reason if its known error.
m
@Yosi Haran can you help here ?
y
Hey, sorry for the delay, I'm unfamiliar with this error, ostensibly seems like a connection issue but I can't be sure - @Arif please feel free to reach out again if the error returns and I will dig deeper to make sure it's not a recurring issue on our end 🙏
a
@Yosi Haran We received the same error again. Can you please check from your end once. And this is not coming frequently but not sure why this was causing. cc- @Mike Hudson @Kenneth Knoll
m
Can you share response header where it failed ? CF-ray header ?
a
@Meir Wahnon - We dont have cf-ray header. Here is the error details: Region: us Time: 2025-09-30T184820.975Z Error: request to https://api.descope.com/v1/mgmt/fga/check failed, reason: socket hang up
Copy code
FetchError: request to https://api.descope.com/v1/mgmt/fga/check failed, reason: socket hang up
    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1501:11)
    at ClientRequest.emit (node:events:519:28)
    at emitErrorEvent (node:_http_client:101:11)
    at TLSSocket.socketOnEnd (node:_http_client:528:5)
    at TLSSocket.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
m
seems like a sporadic network issue, i see 1 error in that time range that got 499 status code do you see the http error code ?
a
@Meir Wahnon - No we did not receive any error code, as that request gives socket hang up issue. Looks like our server not received any response and which cause socket hang up may be. What states for 499, anything needs to change from our side to tackle that?
m
few things on that: 1. I recommend to have retry on your end if you see 499 error code 2. we are releasing soon docker image that can cache FGA check requests on your side , so less chances to get network errors ( looping in @Anvi Banga@Yosi Haran on sharing docs on that) 3. we will look on doing default retry in SDK level for network errors
a
That great! I will make adjustment to add retry mechanism from our side as well.
a
a
@Meir Wahnon @Anvi Banga - Thanks for sharing. Now we are trying to setup this cache mechanism, can you please help me with the method to use cacheURL in node.js SDK https://hub.docker.com/r/descope/authzcache - Example given for GO, but can you help me with node.js SDK method
m
looping in @Yosi Haran here
y
Hey @Arif, currently only our Go, Python & Dotnet SDKs support using authzcache, but I can add it to the node.js SDK as well fairly quickly, either this week or next one should be very possible. I'll get it rolling and let you know once it's ready 🙏
a
@Yosi Haran - That would be helpful. Do let us know once you add. Thanks
@Mike Hudson - Adding for the reference
👍 1