Error code 2504 | UDF Core request failed. Gateway Time-out

Hi,


I have a script running everyday at 8AM Dubai time. Sometimes on Tuesday or Wednesday I get this Gateway Time-out error. After I run again 2-3 times more it will eventually works and not produce the error anymore. I believe it is not because of the RIC limit calls because the same script works effortlessly on most other days. May I know the source of this issue? Is there a downtime I should know about?



Best Answer

  • Hi @Ikmal Azman


    Without more information about your workflow, it will be difficult for me to investigate. However, I can let you know that we advise coding defensively in these instances. I manufactured an error in the code below to exemplify what I mean:


    import refinitiv.data as rdfrom refinitiv.data.content import fundamental_and_reference rd.open_session() request = fundamental_and_reference.Definition(    universe=['LSEG.L'],    fields=['ASK'])


    try:    response = request.get_data()except Exception as e:    print(e.__dict__)


    try:    response = request.get_data()except Exception as e:    if e.__dict__['code'] == -1:        print("The Error Is -1")


    1716804033978.png


    As you can see, you can use a try and if loop to come to a similar functionality to what you asked. Please let me know if this makes sense.