You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENHANCEMENT] analyze code: give failed library imports their own diagnostic code #693
Is your enhancement request related to a problem? Please describe.
robotcode analyze code reports a failed library import with the code DataError, the same code as an argument error. Tools that read the JSON output have to parse the message text to tell "the environment lacks a library" from "the code is wrong", and those two need different reactions: install something, or fix the call.
*** Settings ***Library NoSuchLibrary
Library String
*** Test Cases ***T
Convert To Upper Case a b c
$ robotcode --format json analyze code g.robot
DataError | Importing library 'NoSuchLibrary' failed: ModuleNotFoundError: No module named 'NoSuchLibrary'
DataError | Keyword 'String.Convert To Upper Case' expected 1 argument, got 3.
Describe the solution you'd like
A distinct code for import failures, for example ImportFailed (or LibraryImportFailed, ResourceImportFailed, VariablesImportFailed), so tools can filter on the code.
Describe alternatives you've considered
Matching the message prefix Importing library '…' failed. It works today but breaks if the wording changes or is translated.
Additional context
We use analyze code in Claude Code hooks and in CI checks for agent skills (MarketSquare/robotframework-plugins). Both need to tell an environment problem from a code problem.
AI / tooling disclosure
Drafted with Claude Code (Claude Opus 5.5), which also ran the reproduction on 2.8.0 and 2.9.0.dev214. I approved it for filing, and Claude Code filed it at my request.
Environment
RobotCode Version: 2.8.0 and 2.9.0.dev214 (CLI only)
Activity