ask-solid_errors
SolidErrors service context for AI agents in the ask-rb ecosystem. It wraps the SolidErrors ActiveRecord models so agents can query the error tracking data stored in your Rails database, and provides a structured error guide for common SolidErrors situations.
Installation
gem "ask-solid_errors"
This gem has no HTTP client and needs no authentication. It requires the
solid_errors gem and its tables in your Rails app:
gem "solid_errors"
bin/rails solid_errors:install:migrations
bin/rails db:migrate
Quick Start
require "ask-solid_errors"
# Recent errors
errors = Ask::SolidErrors.recent(limit: 10)
errors.map { |e| { id: e.id, class: e.exception_class, message: e..truncate(200) } }
# Find by ID
error = Ask::SolidErrors.find(42)
error.backtrace
error.context
error.occurrences
# Filter by status, class, or severity
Ask::SolidErrors.unresolved
Ask::SolidErrors.resolved
Ask::SolidErrors.by_class("ActiveRecord::RecordNotFound")
Ask::SolidErrors.by_severity("error")
# Search messages and count occurrences
Ask::SolidErrors.search("timeout")
Ask::SolidErrors.occurrence_count(error)
Key entry points
Ask::SolidErrors.client- a proxy wrappingSolidErrors::Error. Query methods returnActiveRecord::Relationobjects that can be chained further.- Convenience helpers:
recent(limit: 10),find(id),unresolved,resolved,by_class(klass),by_severity(severity),search(query), andoccurrence_count(error). Ask::SolidErrors::Errors- structured error knowledge for agents: guidance by exception class and severity level, plus schema reference.Ask::SolidErrors::DESCRIPTION,GEM_NAME, andQUICK_START- metadata constants for system prompts.
Full documentation
The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs. Services: SolidErrors covers ask-solid_errors in depth, including the client, error guide, and constants. API reference: https://ask-rb.github.io/ask-docs/reference/api.
Development
bundle install
bundle exec rake test
License
MIT