Errors
When a command fails, MyHUD answers with an error code and a message.
- HTTP:
{ "ok": false, "error": "<code>", "message": "..." }, with the status below. - WebSocket:
{ "type": "ack", "ok": false, "code": "<code>", "error": "..." }.
Command errors
| Code | HTTP | Cause | What to do |
|---|---|---|---|
unknown_action | 404 | The command does not exist. | Check the name in Commands or GET /api/actions. |
invalid_payload | 400 | The payload is wrong: missing field, wrong value, veto that does not follow the rules. | Read the message. It names the wrong field. |
conflict | 409 | The command cannot run now: no veto yet on FACEIT, no veto session, map slot empty… | Wait and retry, or do the missing step first. |
unavailable | 503 | Something is missing: main window closed, not signed in, OBS not connected, no subscription. | Open MyHUD and sign in, connect OBS, or check your subscription. |
timeout | 504 | The MyHUD window or FACEIT/HLTV did not answer in time. | Retry. |
upstream_error | 502 | FACEIT, HLTV or the MyHUD server returned an error. | Check the URL, then retry later. |
dispatch_error | 500 | Unexpected error. | Retry. If it happens again, report it with the message. |
Access errors
| Code | HTTP | Cause |
|---|---|---|
unauthorized | 401 | Token missing or wrong, from another device. |
forbidden | 403 | Local network mode is off, or the device is not on a local network. |
forbidden_origin | 403 | The request comes from a web page. |
invalid_host | 403 | The address used to reach MyHUD is not accepted. Use an IP address, localhost or the PC name. |
rate_limited | 429 | More than 20 requests per second from another device. |
WebSocket only
| Code | Cause |
|---|---|
busy | You sent a trigger before you got the ack of the previous one. |
invalid_json | The message is not valid JSON. |
invalid_message | The message has an unknown type or a missing field. |
For close codes, see WebSocket API.
