Error Handling
The cloud connector talks via the internet to some remote service. There are a number of error scenarios that may happen during that communication: the service may not be reachable at all or the connection may be lost while data is transferred from or to the service. At a basic level, your connector should be able to detect that kind of errors. A more advanced implementation could implement retry if a connection loss was detected or could store messages to be delivered later.
At the application protocol there is often an error code or error message embedded in the resulting JSON or XML data. The HTTP status code is sometimes used, too. Your connector should check for errors on the application protocol layer and translate them to appropriate exceptions in code.