If I try to request the chain report for chain 13, I get the following structure of error message:
As far as I know, this used to be the shape of all error results from the chain report API, so you could check for failure by looking if there is a "success" field set to false.
However, now, if I try to request the chain report for chain 1300000000, I instead get the following structure of error:
It seems really strange that the API should report errors with two different structures of error message, so I have to try two different things to check if there was an error. This must be something that was overlooked in changing the chain report API at some point, right? I'd really like it if error results had consistently named fields...
{
"success": [
false
],
"msg": [
"This report is no longer available"
]
}
As far as I know, this used to be the shape of all error results from the chain report API, so you could check for failure by looking if there is a "success" field set to false.
However, now, if I try to request the chain report for chain 1300000000, I instead get the following structure of error:
{
"code": [
6
],
"error": [
"Incorrect ID"
]
}
It seems really strange that the API should report errors with two different structures of error message, so I have to try two different things to check if there was an error. This must be something that was overlooked in changing the chain report API at some point, right? I'd really like it if error results had consistently named fields...