The documentation doesn't say anything about the HTTP code sent when the service is (temporarily) not available. In order to be able to cope with such situations programmatically (e.g classify that as a temporary error) it would be nice to know which (or whether) there's a specific HTTP code (maybe HTTP 503) returned.
asked 12 Apr '13, 14:24
On the one hand it is not always possible to return reasonable error code. On the other hand it is right that there are cases when it is possible. So, both sides are right.
The Cloud OCR SDK developers agree that in some situations, when our Web Role is able to diagnose a breakdown of Worker Role, we could return HTTP 500.
Actually the known problems are solved and will not be repeated. In other words we don't know about situations when we could return HTTP 503, therefore it is not described in documentation. As soon as our tests or the developing process reveal "vulnerabilities", we will use this approach and we will return more specific error 503 instead of common error 500.
The thing is that the service is designed to be fail safe, redundant and always up. There is no planned outages. We first test updates on staging environment and when it is OK we switch test and production. Production environment consist of several independent instances and if one fails others continue to work. There are several level of monitoring that detect problems and take proactive actions, such as role rebooting.
With all that said, the only case when service is not working as expected, is that something went wrong. I mean really wrong. Such as global failure of Microsoft Azure hosting environment, for example. In this case, we cannot predict what exactly error code you would get. That completely depends on how exactly things went wrong.
answered 12 Apr '13, 18:51
Andrey Isaev ♦♦