How to handle API response when trying to access MF data on Holidays.
Suppose i am trying to get data for SATURDAY, in this case API not returning anything/Returning Error.
Now API is returning schemes in below format. errorNode is there which is showing what is not found.
{ “meta”: { “statusMessage”: “OK”, “statusCode”: 200, “createdAt”: “2018-09-08T15:09:29.071”, “uuid”: “2ae6ac98-d61c-4da4-9b6d-5ff8a352c6fb”, “responseTimeInMillis”: 11 }, “data”: [ { “schemeCode”: “100526”, “schemeName”: “Franklin India Taxshield-Growth”, “nav”: 559.35, “date”: “10-Jul-2018” }, { “schemeCode”: “112278”, “schemeName”: “Axis Bluechip Fund - Dividend”, “nav”: 16.34, “date”: “11-Jul-2018” } ], “error”: { “message”: “Some Schemes Not Found”, “errorNode”: [ { “schemeCode”: “100526”, “date”: “14-Jul-2018” } ] } }
It is possible that API returns NULL in nav if it is not found. Need to configure that. Currently it is not sending any data if nav is not found.
Приєднуйтесь до обговорення — додайте повідомлення нижче:
Now API is returning schemes in below format. errorNode is there which is showing what is not found.
{
“meta”: {
“statusMessage”: “OK”,
“statusCode”: 200,
“createdAt”: “2018-09-08T15:09:29.071”,
“uuid”: “2ae6ac98-d61c-4da4-9b6d-5ff8a352c6fb”,
“responseTimeInMillis”: 11
},
“data”: [
{
“schemeCode”: “100526”,
“schemeName”: “Franklin India Taxshield-Growth”,
“nav”: 559.35,
“date”: “10-Jul-2018”
},
{
“schemeCode”: “112278”,
“schemeName”: “Axis Bluechip Fund - Dividend”,
“nav”: 16.34,
“date”: “11-Jul-2018”
}
],
“error”: {
“message”: “Some Schemes Not Found”,
“errorNode”: [
{
“schemeCode”: “100526”,
“date”: “14-Jul-2018”
}
]
}
}
It is possible that API returns NULL in nav if it is not found. Need to configure that. Currently it is not sending any data if nav is not found.