NetworkException - kite.common (Node JS)

tfKamran
I am very thrilled to see these errors in my logs when my code tried to sell my holdings to stop losses.

{ status: 'error',
message: 'Request Failed.',
data: null,
error_type: 'NetworkException' }
Tagged:
  • tfKamran
    The first function call in the loop goes through, for the rest this error is thrown.
  • sujith
    Can you run in debug mode and give the complete stacktrace?
  • tfKamran
    Unfortunately, I cannot reproduce it anymore.
  • Sivaji
    Hi
    I too got the similar problem today while getting the instruments list for NSE. I am using nodejs kiteconnect npm (https://www.npmjs.com/package/kiteconnect). I got the following error and my automation stopped abruptly.

    { message: 'Bad Gateway', error_type: 'NetworkException', data: null }

    This was working for the past one week.

    @sujith , If it is a consistent issue, we can run it in debug mode and can give you the stacktrace. This is happended for me only once which has done the damage what it can do.

    Kindly explain me why it is happening and if the error occurs how to handle this error like can we make a call again immeadiatly ?
  • rakeshr
    @Sivaji
    If it is a consistent issue, we can run it in debug mode and can give you the stack trace.
    No, we haven't seen this happening frequently. The stack trace will help us to debug more on this issue.
    Kindly explain me why it is happening
    It's generic 502(Bad gateway). Your stack trace will help us to debug more on this.
    how to handle this error like can we make a call again immediately?
    You can refer to this answer to know more about exception handling.
Sign In or Register to comment.