|
| 1 | +.. _error-reply: |
| 2 | + |
| 3 | +``error_*``: Error Replies |
| 4 | +-------------------------- |
| 5 | + |
| 6 | +Contains an error class from the list below as its second item (the specifier). |
| 7 | +The third item of the message is an :ref:`prop-error-report`, containing the |
| 8 | +request message (minus line endings) as a string in its first element, a (short) |
| 9 | +human readable text as its second element. The third element is a JSON object, |
| 10 | +containing possibly implementation specific information about the error (stack |
| 11 | +dump etc.). |
| 12 | + |
| 13 | +Example: |
| 14 | + |
| 15 | +.. code:: |
| 16 | +
|
| 17 | + > read tx:target |
| 18 | + < error_read tx:target ["NoSuchModule","tx is not configured on this SEC node", {}] |
| 19 | + > change ts:target 12 |
| 20 | + < error_change ts:target ["NoSuchParameter","ts has no parameter target", {}] |
| 21 | + > change t:target -9 |
| 22 | + < error_change t:target ["BadValue","requested value (-9) is outside limits (0..300)", {}] |
| 23 | + > meas:volt? |
| 24 | + < error_meas:volt? ["ProtocolError","unknown action", {}] |
| 25 | +
|
| 26 | +
|
| 27 | +.. _error-classes: |
| 28 | + |
| 29 | +Error Classes |
| 30 | +------------- |
| 31 | + |
| 32 | +Error classes are divided into two groups: persisting errors and retryable |
| 33 | +errors. Persisting errors will yield the exact same error message if the exact |
| 34 | +same request is sent at any later time. A retryable error may give different |
| 35 | +results if the exact same message is sent at a later time, i.e. depends on state |
| 36 | +information internal to either the SEC node, the module or the connected |
| 37 | +hardware. |
| 38 | + |
| 39 | +.. rubric:: Persisting errors |
| 40 | + |
| 41 | +.. errorclass:: ProtocolError |
| 42 | + |
| 43 | + A malformed Request or on unspecified message was sent. This includes |
| 44 | + non-understood actions and malformed specifiers. Also if the message |
| 45 | + exceeds an implementation defined maximum size. *Note: this may be |
| 46 | + retryable if induced by a noisy connection.* |
| 47 | + |
| 48 | +.. errorclass:: NoSuchModule |
| 49 | + |
| 50 | + The action can not be performed as the specified module is non-existent. |
| 51 | + |
| 52 | +.. errorclass:: NoSuchParameter |
| 53 | + |
| 54 | + The action can not be performed as the specified parameter is non-existent. |
| 55 | + |
| 56 | +.. errorclass:: NoSuchCommand |
| 57 | + |
| 58 | + The specified command does not exist. |
| 59 | + |
| 60 | +.. errorclass:: ReadOnly |
| 61 | + |
| 62 | + The requested write can not be performed on a readonly value. |
| 63 | + |
| 64 | +.. errorclass:: NotCheckable |
| 65 | + |
| 66 | + The requested check can not be performed on the specified parameter |
| 67 | + (i.e. on parameters, where no :ref:`checkable <prop-checkable>` property |
| 68 | + is present, or if it is set to false). |
| 69 | + |
| 70 | +.. errorclass:: WrongType |
| 71 | + |
| 72 | + The requested parameter change or command can not be performed as the |
| 73 | + argument has the wrong type, e.g. a string where a number is expected, |
| 74 | + or a struct doesn't have all required members. |
| 75 | + |
| 76 | +.. errorclass:: RangeError |
| 77 | + |
| 78 | + The requested parameter change or command can not be performed as the |
| 79 | + argument value is not in the allowed range specified by the ``datainfo`` |
| 80 | + property. This also happens if an unspecified enum variant is tried to |
| 81 | + be used, the size of a blob or string does not match the limits given in |
| 82 | + the descriptive data, or if the number of elements in an array does not |
| 83 | + match the limits given in the descriptive data. |
| 84 | + |
| 85 | +.. errorclass:: BadJSON |
| 86 | + |
| 87 | + The data part of the message can not be parsed, i.e. the JSON data is |
| 88 | + not valid JSON. |
| 89 | + |
| 90 | +.. errorclass:: NotImplemented |
| 91 | + |
| 92 | + A (not yet) implemented action or combination of action and specifier |
| 93 | + was requested. This should not be used in productive setups, but is |
| 94 | + very helpful during development. |
| 95 | + |
| 96 | +.. errorclass:: HardwareError |
| 97 | + |
| 98 | + The connected hardware operates incorrectly or may not operate at all |
| 99 | + due to errors inside or in connected components. |
| 100 | + |
| 101 | +.. rubric:: Retryable errors |
| 102 | + |
| 103 | +.. errorclass:: CommandRunning |
| 104 | + |
| 105 | + The command is already executing. The request may be retried after the |
| 106 | + module is no longer BUSY. |
| 107 | + |
| 108 | +.. errorclass:: CommunicationFailed |
| 109 | + |
| 110 | + Some communication (with hardware controlled by this SEC node) failed. |
| 111 | + |
| 112 | +.. errorclass:: TimeoutError |
| 113 | + |
| 114 | + Some initiated action took longer than the maximum allowed time. |
| 115 | + |
| 116 | +.. errorclass:: IsBusy |
| 117 | + |
| 118 | + The requested action can not be performed while the module is BUSY or |
| 119 | + the command still running. |
| 120 | + |
| 121 | +.. errorclass:: IsError |
| 122 | + |
| 123 | + The requested action can not be performed while the module is in error |
| 124 | + state. |
| 125 | + |
| 126 | +.. errorclass:: Disabled |
| 127 | + |
| 128 | + The requested action can not be performed while the module is disabled. |
| 129 | + |
| 130 | +.. errorclass:: Impossible |
| 131 | + |
| 132 | + The requested action can not be performed at the moment. |
| 133 | + |
| 134 | +.. errorclass:: ReadFailed |
| 135 | + |
| 136 | + The requested parameter can not be read just now. |
| 137 | + |
| 138 | +.. errorclass:: OutOfRange |
| 139 | + |
| 140 | + The value read from the hardware is out of sensor or calibration range. |
| 141 | + |
| 142 | +.. errorclass:: InternalError |
| 143 | + |
| 144 | + Something that should never happen just happened. |
| 145 | + |
| 146 | +.. note:: This list may be extended, if needed. Clients should treat unknown |
| 147 | + error classes as generic errors. |
0 commit comments