ThingWorx Edge C SDK > Callback Function Return Codes
Callback Function Return Codes
The following table contains the acceptable return codes (msgCodeEnum) for all Property and Service callback functions. These codes are defined in src/api/twDefinitions.h. The callback functions are invoked as a result incoming requests from ThingWorx platform. The property and service callback function signatures are defined in src/api/twApi.h.
Return Code
Returned When
HTTP Client Error Status Codes
0x40 (2.00) Success. The request completes successfully.
0x80 (4.00) Bad request. The HTTP request contains syntax errors, so the server cannot understand it. Modify the request before attempting it again.
0x81 (4.01) Unauthorized. The request requires authentication. This error results from a failed login attempt — whether from credentials that were not valid or from the request being sent before authentication occurred.
0x82 (4.02) Bad option. An option or a parameter for a function has a value that is not valid or is not spelled correctly (and so is not recognized).
0x83 (4.03) Forbidden. ThingWorx platform is denying access to the requested resource. Check your permission settings on ThingWorx platform.
0x84 (4.04) Not found. Anything is not found — a property, a service, a thing, a data shape, and so on.
0x85 (4.05) Method not allowed. The specified method is not allowed. Check the spelling and syntax of your code.
0x86 (4.06) Not acceptable.
0x8C (4.12) Precondition failed. The precondition for the operation is not met.
0x8D (4.13) Entity too large. An attempt is made to send a Property, or Service or Event parameter that is too large for ThingWorx platform to handle.
0x8F (4.15) Unsupported content format. An attempt is made to send a Property, or Service or Event parameter that has the wrong baseType as defined on ThingWorx platform.
HTTP Server Error Status Codes
0xA0 (5.00) Internal server error. An error occurs on ThingWorx platform while processing this request.
0xA1 (5.01) Not implemented. ThingWorx platform may return this error if you attempt a function that is not implemented.
0xA2 (5.02) Bad gateway. A gateway could be bad if it cannot communicate to the next component in the chain.
0xA3 (5.03) Service unavailable. The requested service is not defined. You could also use the TW_NOT_FOUND error code, but this one is more specific.
0xA4 (5.04) Gateway timeout. If the application sends a request to ThingWorx platform and does not get a response within some amount of time, the service call results in this error. The amount of time is configurable.
Wrote to offline message store. The message is not sent to ThingWorx platform, but instead is stored in the offline message store. The message will be delivered next time the websocket is connected.