---
title: "Status Codes"
description: "Status codes of LumiScan Script Runner: the module state on status/code and the outcome of each run on run/output/status-code, with what to do."
product: "LumiScan Script Runner"
component: "lumiscan-script-runner"
version: "1.0.0"
display_version: "1.0.0.2"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-script-runner/status-codes.html"
---

# Status Codes – LumiScan Script Runner

The Script Runner reports on two nodes per module:

- `v1/<module>/status/code` (with `status/text`): the **module’s state**. Anything but `0` means the module accepts no request, and `run/ready` is `false`.
- `v1/<module>/run/output/status-code` (with `run/output/status-text`): the **outcome of the last run**. At the end of a run it is `0` or negative; while a run is going on it is `2`. A client that uses `running`, `done` and `has-error` can ignore the `2`.

The status text always says more: the parameter, the HALCON error, the key or the hash concerned.

## Module state (`status/code`) {#module-state}

| Code | Name | Meaning and what to do |
| --- | --- | --- |
| `0` | ready | The module is built and accepts requests. |
| `-4` | missingLicense | A licence is missing: the HALCON runtime licence is not valid, or it does not cover a HALCON module the procedure needs (the text names it). See [Troubleshooting](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/troubleshooting.html#ts-licence). |
| `-5` | restartRequired | The settings were changed over the Data Layer, or an interface file was saved with `interface-save`. Restart the app. |
| `-10002` | scriptNotLoaded | The procedure is missing, did not load, or its interface cannot be mapped (the text names the parameter), or the module’s `start` run failed. The module has only its `status/`, `script/` and fixed `run` nodes. See [Troubleshooting](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/troubleshooting.html#ts-script-not-loaded). |
| `-10005` | interfaceChanged | The procedure’s interface hash is not the module’s accepted hash, or the module has no accepted hash yet. The text gives both hashes. Accept the current hash in the module’s `acceptedInterfaceHash`, or save the interface file with `interface-save`. See [Replace a Script](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/how-tos/replace-a-script.html). |

## Run outcome (`run/output/status-code`) {#run-outcome}

| Code | Name | Meaning and what to do |
| --- | --- | --- |
| `0` | ok | The run succeeded; the outputs are written, `done` is `true`. |
| `2` | running | The run was acknowledged and is going on (or waits in its group’s queue). |
| `-3` | invalidInput | An input failed its check before the procedure ran: missing or of the wrong kind, outside min and max, an image of an unknown or unaccepted pixel type or of the wrong size, or a handle from the store that is invalid or of the wrong kind. The text names the input. |
| `-4` | missingLicense | HALCON refused an operator for licence reasons during the run, for example because the HALCON dongle was pulled. The module reports `-4` until the app is restarted with a valid licence. |
| `-10001` | scriptError | The procedure raised an error: its own `throw`, or a HALCON operator failed. The text names the procedure (or sub-procedure), the program line, the HALCON error number and the message. Window errors get a hint: the Script Runner has no display. |
| `-10003` | outputTypeMismatch | An output does not match the interface, or the procedure never set it. The text names the parameter, the declared and the returned type. No output is written. |
| `-10004` | storeValueMissing | An input bound to the group’s store found its key empty. The text names the key and the modules that write it. See [Modules, Groups and the Store](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/modules-groups-and-store.html). |

On a failure `has-error` is `true` and no output node is written.
