Common error codes

The following table lists error codes common to the IoT Hub REST APIs.

Common error codes

Error code Description HTTP status code
400 The body of the request is not valid; for example, it cannot be parsed, or the object cannot be validated. 400 Bad format
401 The authorization token cannot be validated; for example, it is expired or does not apply to the request’s URI and/or method. 401 Unauthorized
404 The IoT hub instance or a device identity does not exist. 404 Not Found
403 The maximum number of device identities has been reached. 403 Too many devices
412 The etag in the request does not match the etag of the existing resource, as per RFC7232. 412 Precondition failed.
429 This IoT hub’s identity registry operations are being throttled by the service. For more information, see IoT Hub Developer Guide – Throttling for more information. An exponential back-off strategy is recommended. 429 Too many requests
500 An internal error occurred. 500 Internal Server Error