Skip to content

Commit

Permalink
add solid errors gem
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Jan 28, 2024
1 parent a9c7400 commit f794af0
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ gem "rouge", "~> 4.2"
# analytics
gem "ahoy_matey"
gem "blazer"

gem "solid_errors", "~> 0.3.3"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ GEM
sitepress-core (= 4.0.2)
sprockets-rails (>= 2.0.0)
smart_properties (1.17.0)
solid_errors (0.3.3)
rails (~> 7.0)
sorbet-runtime (0.5.11200)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -568,6 +570,7 @@ DEPENDENCIES
ruby-lsp-rails
selenium-webdriver
sitepress-rails (~> 4.0)
solid_errors (~> 0.3.3)
sqlite3 (~> 1.4)
standardrb (~> 1.0)
stimulus-rails
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
authenticate :admin do
mount Avo::Engine, at: Avo.configuration.root_path
mount Blazer::Engine, at: "blazer"
mount SolidErrors::Engine, at: "/solid_errors"
end

# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
Expand Down
25 changes: 25 additions & 0 deletions db/migrate/20240128210010_create_solid_errors_tables.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

class CreateSolidErrorsTables < ActiveRecord::Migration[7.1]
def change
create_table :solid_errors do |t|
t.string :exception_class, null: false
t.string :message, null: false
t.string :severity, null: false
t.string :source
t.datetime :resolved_at, index: true

t.timestamps

t.index [:exception_class, :message, :severity, :source], unique: true, name: "solid_error_uniqueness_index"
end

create_table :solid_errors_occurrences do |t|
t.belongs_to :error, null: false, foreign_key: { to_table: :solid_errors }
t.text :backtrace
t.json :context

t.timestamps
end
end
end
24 changes: 23 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f794af0

Please sign in to comment.