← centrs docs

routeros/api-trap

RouterOS answered a native-API command with a !trap, and its message matches no rule in centrs's mapping table. RouterOS's own words, in summary and context.detail, are the reason. The command reached the router and may have partly run: anything before the error stays applied. The same error over REST, SSH or MAC-Telnet is routeros/request-failed.

Emitted by

retrieve, execute, api and transfer over --via native-api, and execute --cmr when the controller is reached over the native API. Switching transport does not help: RouterOS gives the same message on each.

Context

Typical triggers

A trap during login is not this code: it is transport/auth-failed.

Fix

If this looks wrong

This code is a gap in centrs's mapping (src/core/routeros-errors.ts), not a RouterOS fault class. When a message recurs, open an issue with the command, the --json envelope (it carries context.detail and cause), the RouterOS version and centrs --version, so the message can get its own code. Remove passwords (--password, --cdb-password) and other secrets from both first.