cancel a order with wrong order id results in 500 Internal server



  • By mistake I tried to cancel a order which had a wrong order ID. I got 500 Internal server error. That raises a question whether I should get a 400 bad request in response for ALL such invalid operation where user tries to access/update/delete orders which do not belong to his account?

    Traceback (most recent call last):
    response=u.cancel_order(17071400004825)
    File "C:\Python35-32\lib\site-packages\upstox_api\api.py", line 489, in cancel_order
    return self.api_call_helper('cancelOrder', PyCurlVerbs.DELETE, {'order_id' : order_id}, None)
    File "C:\Python35-32\lib\site-packages\upstox_api\api.py", line 693, in api_call_helper
    raise requests.HTTPError(response.text)
    requests.exceptions.HTTPError: {"code":500,"status":"Internal Server Error","timestamp":"2017-07-14T14:21:33+05:30","message":"Something went wrong while cancelling order. Please try again.","error":{"name":"Error","reason":"Something went wrong while cancelling order. Please try again."}}


Log in to reply
 

Looks like your connection to Upstox Forum was lost, please wait while we try to reconnect.