Skip to content

[Feature] Improve error messages #57

Description

@scarowar

Summary

Provide more helpful error messages for common failures.

Problem to solve

When inso fails, users see generic "Inso CLI Error" messages. More context would help debugging.

Proposed solution

Detect common error patterns and provide actionable guidance:

  1. "No collection found" → Suggest checking identifier and working-directory
  2. "Environment not found" → List available environments
  3. "Connection refused" → Suggest checking if API server is running
  4. Timeout → Suggest increasing execution-timeout

Implementation:
Add error pattern matching in runner.py:

ERROR_HINTS = {
    "no collection": "Check that --identifier matches a collection name in your workspace",
    "environment not found": "Available environments can be found in Insomnia's environment dropdown",
    "ECONNREFUSED": "Ensure your API server is running and accessible",
}

Alternatives considered

No response

Additional context

Files to modify:

  • src/insomnia_run/runner.py (add error detection)
  • src/insomnia_run/reporter.py (display hints in report)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions