Skip to main content

Error codes

Every error from the Console API carries a stable code. The code does not change between releases, so you can build alerts and scripts on it.

The error envelope​

{
"error": {
"code": "MI-1002",
"class": "config",
"message": "configuration failed validation",
"details": {}
}
}

The class groups codes by where to look:

ClassCodesLook at
configMI-1xxxThe request or the setup
transportMI-2xxxNetwork and TLS to devices, brokers and services
protocolMI-3xxxThe device protocol, addresses and types
permissionMI-4xxx and MI-5003Sign-in, roles, rate limits, edition features
licenseMI-5001, MI-5002Licence limits and expiry
internalMI-6xxxThe Console itself

The Console also serves this catalogue in code. Each entry has code, class, HTTP status, message and description.

Catalogue​

CodeClassHTTPMeaningWhat to do
MI-1001config400Request body is invalid: the JSON could not be decoded or contained unknown fields.Check the JSON syntax and field names against the API reference. Do not send fields the route does not define.
MI-1002config400Configuration failed validation: a name, interval or other field failed normalization.Read the message; fix the named field (length, characters, range).
MI-1003config404Resource was not found: the device, uplink, stream, rule or related object does not exist.Check the id. It may have been deleted, or it is outside your scoped access.
MI-1004config409Resource already exists: a uniqueness constraint would be violated, such as a duplicate subscription.Use another name or id, or edit the existing object.
MI-1005config422Protocol is not selectable: the catalogue entry exists but is planned or not hosted by this runtime.Choose a protocol that this Site Runtime hosts. See Protocol reference.
MI-1006config422Required capability is not hosted: a plugin, stream source or sink is not available.Use a runtime version that includes the plugin, or choose another type.
MI-1007config400Rule SQL is invalid: the restricted SQL parser rejected the rule.Fix the statement. You can check it first with POST /api/v2/rules/validate. See Rules.
MI-1008config400Configuration is invalid: a required key is missing or out of range.Set the missing or out-of-range setting named in the message.
MI-1009config500Database schema does not match this binary: the database has a migration the binary does not know, or a required migration is missing.Run the migration of the matching version, or use matching Console and database versions. See Upgrade.
MI-1010config400TLS configuration is invalid: certificate or key files are missing, mismatched or unreadable.Check MI_CONSOLE_TLS_CERT_FILE, MI_CONSOLE_TLS_KEY_FILE and file permissions.
MI-1011config500Secrets master key is missing, shorter than 32 characters, or cannot open stored secrets.Set MI_MASTER_KEY (32 or more characters). If a secret was sealed with an older key, set MI_MASTER_KEY_PREVIOUS to rotate.
MI-1012config503The Windows site runtime EXE is not installed on this Console.Install the Windows runtime pack and set MI_WINDOWS_RUNTIME_EXE, or use a Linux or Docker runtime.
MI-1013config413Request body is too large.Split large tag writes into batch upserts.
MI-1020config400A renamed environment variable from 1.x is still set.Remove the old variable and use the MI_ name shown in the error details.
MI-2001transport502Connection failed: a device, uplink or control-plane connection could not be established.Check address, port, firewall and that the target is up. For devices see the protocol page.
MI-2002transport504Operation timed out: a protocol or HTTP operation exceeded its deadline.Raise the timeout, reduce load on the device, or check the network.
MI-2003transport502TLS handshake failed with a broker, device or API.Check the certificate chain, the host name and the clock on both sides. See Certificates.
MI-3001protocol502The device returned a protocol exception, such as a Modbus exception code.Check the address map, unit id and the device manual for the exception.
MI-3002protocol400The driver does not implement the requested protocol function.Use a supported function, or another protocol.
MI-3003protocol400Device address is invalid: it could not be parsed or is outside the device map.Check the address form on the protocol page, for example 1!40002.
MI-3004protocol400Data type is not valid for this address area.Choose a data type the area allows. See Data types.
MI-4001permission401Authentication is required: the bearer token is missing or invalid.Sign in again, or send a valid token, key or credential.
MI-4002permission403Permission denied: the signed-in principal may not do this.Ask an administrator for a role with the needed capability. See Users and roles.
MI-4003permission429Too many attempts or requests; retry later.Wait for the Retry-After seconds. At sign-in this is separate from the account lockout.
MI-5001license422Licence limit reached: a licensed node or tag limit would be exceeded.Remove objects or upgrade the licence. See Licensing.
MI-5002license422Licence has expired, or is missing or invalid.Upload a valid licence file in Settings → License.
MI-5003permission402This feature is not included in the current licence edition (it is Enterprise-only).Upgrade the edition. The class is permission, not license.
MI-6001internal500Internal error: an unexpected failure.Check the Console log with the X-Request-ID. Do not retry blindly if the operation is not idempotent.
MI-6002internal500Configuration store unavailable: PostgreSQL or the store failed during a request.Check that mi-db is running and reachable. See Health and logs.

Codes by range: MI-1001 to MI-1013 and MI-1020 are configuration, MI-2001 to MI-2003 transport, MI-3001 to MI-3004 protocol, MI-4001 to MI-4003 permission, MI-5001 to MI-5003 licence and edition, MI-6001 and MI-6002 internal.

note

MI-4001 is also returned when an API key or agent credential is missing, wrong, expired or revoked, or its owner is disabled.

Details you may see​

  • For approval policy refusals, details.reason is approvals, window, clock, role, approved, emergency or unavailable. See Approvals and safe write.
  • For fleet joins, details.reason can be replay, identity_conflict, identity_revoked, identity_unknown, schema_unsupported, payload_rejected, wrong_fleet, wrong_mode, token_invalid, already_enrolled or not_licensed.

MCP error codes​

AI assistants on the MCP endpoint get their own codes, in the error text and in _meta["com.makeitintelligent/error"].

CodeMeaningWhat to do
MI-MCP-400An argument is missing, unknown or has the wrong type.Correct it and call again.
MI-MCP-403The credential may not use the tool or see the object.Do not repeat; ask for access.
MI-MCP-404Unknown id or name, or out of scope.Look it up with mii_find.
MI-MCP-409The object is not in a state that allows this.Read its state, then decide again.
MI-MCP-413The result is too large.Narrow the query or time range.
MI-MCP-429Too many calls.Wait for Retry-After.
MI-MCP-500The call failed.Try once more, then tell the person.
MI-MCP-502Console, historian or Site Runtime error.Try once more, then tell the person.
MI-MCP-503A part is unavailable, or MCP is switched off.Do not retry in a loop.
MI-MCP-504The plant did not answer in time.Try a smaller range once.

Write reject reasons​

A tag write that the runtime refuses reports one of these reasons (see Approvals and safe write): out_of_limits, step_too_large, read_bad, read_stale, expected_required, changed_since_approval, request_expired, pulse_active, held, request_id_reused, journal_unavailable, policy_required, scaled_tag, unsupported_type, bad_value.

Troubleshooting by symptom​

SymptomLikely codeFirst step
Console does not start, mentions the master keyMI-1011Set MI_MASTER_KEY.
Console does not start, mentions an old variableMI-1020Rename it to the MI_ name.
Console does not start, TLS errorMI-1010Check certificate and key paths.
Cannot sign in, "too many attempts"MI-4003Wait.
Device offlineMI-2001, MI-2002Check network and address.
Tag shows an errorMI-3003, MI-3004Check the address and type.
Cannot save LDAP or approval policiesMI-5003Enterprise licence needed.
"Licence limit" when adding tagsMI-5001Check usage under Settings → License.