Response Syntax
Success
When a command that does not return a result value succeeds, HMP responds with OK
.
Success with Result
When a command that returns a result value succeeds, HMP responds with OK followed by a | character (code U+007C) followed by the response value.
Error
When a command fails for any reason, HMP responds with:
- ERROR followed by a | character (code U+007C)
- followed by a six-digit error code followed by another | character
- followed by an error message.
The response has the following format: "ERROR|Code|Error message"
.
For a general list of error messages, see General Errors. Also, refer to command-specific errors listed under each command in Command Line API Reference.