Short answer: The assembler does not know the word you used where an opcode belongs. Usually a typo, or an opcode that does not exist.
1 error: 2: unknown opcode: foo
Source: POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03.
Captured with a program whose second line was foo. The message gives the line number (2) and prints the word it rejected.
app_global_get).Wording can change between node versions. All API errors · errors.json · transaction errors · SDK errors · costs