Clarification Needed
-
@admin
I can see that a single error code is having multiple error mesages.
For Example:
For errorcode: AB1007, i have seen below three message().- INVALID PARAMETERS --> (when I tried to place order with incorrect parameters)
- YOUR USER ID OR PASSWORD IS INVALID --> (when i tried to login with incorrect credentials)
- AMX Error -->(this is the message given in Documentation)
Since i am getting different type of message for single code from the SmartAPI, My logic for error handling is kinda messed up right now.
Now for second question:
I can see that the response structure itself is getting changed for particular type of request. As per documentation, it should be like below for both success and failure scenarios.
*Success:
{
"status" : true,
"message" : "SUCCESS",
"errorcode" : "",
"data" : {}
}Failure
{
"status" : false,
"message" : "Invalid totp",
"errorcode" : "AB1050",
"data" : null
}But whenever I hit a request with incorrect jwttoken then i get the below response:
{
"success" : false,
"message" : "Invalid Token",
"errorCode" : "AG8001",
"data" : ""
}
So far i have seen this response in getProfile call and placeOrder call (when request is called with invalid authorization token). Instead of status key as false , I get a field names success with value false and the errorCode should be errorcode(with lower case 'c').How could i write the logic for processing the response , if it varies like this. please look into this and correct this at the earliest. I have notified to @Apoorva-Jayaswal (apoorva.jayswal@angelbroking.com) through email 2 weeks back.
-
@admin
Thanks for your reply. Please let me know once this is updated. 😊 -
@laskshmi said in Clarification Needed:
How could i write the logic for processing the response , if it varies like this. please look into this and correct this at the earliest. I have notified to @Apoorva-Jayaswal (apoorva.jayswal@angelbroking.com) through email 2 weeks back.
Hi Lakshmi, thank you for sharing your feedback. We will look into the same.