We have the following format of response to client if request is successful:
{
"ExitCode": 1,
"ErrorMessage": "",
"NumberOfGreenBoxMatches": 4,
"NumberOfPinkBoxExtractFrames": 5,
"ProcessingTime": 4000,
“HasOverlay”: false;
"MatchResult": "...."
}
If a client request is bad or internal error is happened customer proposes to return the following:
{
"ExitCode": -10,
"ErrorMessage": "Internal error parsing pink boxes. Please contact tech support",
"NumberOfGreenBoxMatches": 0,
"NumberOfPinkBoxExtractFrames": 0,
"ProcessingTime": 1240,
“HasOverlay”: false;
"MatchResult": ""
}
is it correct approach (return the similar json)? My opinion is no, we should return only like
{ "ErrorMessage": "Internal error parsing pink boxes. Please contact tech support" }
and correct HttpCode. What is correct way?