A refusal is an answer, in Bentrix's own words — what each language throws, how to read the sentence, and the refusals a program meets most.
When Bentrix will not do what a call asks — a market that is closed, a volume below the market's step, a scope the program was not given, a workbench whose engine is still arming — the call does not fail silently. It raises an error in your language carrying Bentrix's own sentence, the same one a person would read on the screen, and often a short machine word for the kind of refusal.
01What each language raises
| Language | A refused tool | Its sentence | Its machine word | Bentrix not running |
|---|---|---|---|---|
| Python | bentrix.ToolError (a bentrix.BentrixError) | e.message | e.machine | bentrix.NotRunning |
| JavaScript | ToolError (a BentrixError) | e.message | e.machine | NotRunning |
| C# | ToolException (a BentrixException) | e.Message | — | NotRunningException |
| Go | *mcp.ToolError (check with errors.As) | e.Msg | e.Machine | an error from mcp.Connect |
| Java | Client.ToolException (a Client.McpException) | e.getMessage() | — | Client.NotRunningException |
| C++ | bentrix::mcp::ToolError (a bentrix::mcp::Error) | e.what() | e.machine | bentrix::mcp::NotRunning |
| Julia | BentrixMCP.ToolError | e.msg | — | an error from connect |
| R | the condition bentrix_tool_error (also a bentrix_error) | conditionMessage(e) | — | a bentrix_error from connect |
| Rust | mcp::Error::Tool { tool, message, machine } | message | machine | an mcp::Error from connect |
Catch it as you catch any error in your language — try/except, try/catch, if err != nil, tryCatch, match — and print the sentence: it says what was wrong and, most of the time, what to do.
02The refusals a program meets most
| The sentence says | What it means | What to do |
|---|---|---|
| …has no engine yet… / …is not mounted… | the workbench is still arming over its markets | wait until its engine is ready (guide 2's step 4) |
| …is not the one open in the window; select the workbench first. | a laboratory's data is read through the selected workbench | select_bench it |
| insufficient scope: … | the program's pairing does not have that scope | give it in ☰ › Settings › Agents, or decide it should not have it |
| …is on the wrong side of the market… | a limit or stop order's price is on the wrong side | a buy limit below the ask, a buy stop above it |
| …inside the stops level… | a stop or target too close to the price, as the broker sets it | move it further out |
| …is closed… | the market is closed at the workbench's clock | step the clock to a trading session |
| busy | 16 calls of this program are already running | wait for one to finish |
| expired / refused_by_cap | a real order under One-click outran its time or its caps | see real accounts and safety |
A refusal never leaves anything half done: an order the venue refused is not in the book; a step that was refused did not move the clock.
03Long work: a job
A few tools answer a job instead of a result: work that takes long, or that waits for you first (closing Bentrix, forgetting an account, deleting a laboratory). The call answers at once; the job's wait gives the result when it ends, or raises the job's failure — the person kept it, for instance. Each method's page says when it answers a job.