As of Cumulocity IoT 10.8 release in January 2021 the error code 40 will only be returned in cases where a template cannot be found. Previously the same error code was also returned on connection problems.
Why are we doing this? Currently when connecting to Cumulocity via SmartREST 1.0 it is possible to receive an error code 40, often like this:
This error means that the platform has restarted, session has expired, or some other connectivity problem occured. This number is misleading, because according to documentation 40 means “Template not found.”.
When the 40 error is removed the error will look like this: