{"id":26824121,"url":"https://github.com/serihiro/practical_errors","last_synced_at":"2026-05-18T15:37:07.761Z","repository":{"id":52688696,"uuid":"56017061","full_name":"serihiro/practical_errors","owner":"serihiro","description":"Gem for Rails that makes rails error messages more practical.","archived":false,"fork":false,"pushed_at":"2023-10-30T23:19:26.000Z","size":13,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-02T20:24:43.914Z","etag":null,"topics":["error-handling","rails","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/practical_errors","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serihiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-12T00:11:37.000Z","updated_at":"2021-04-21T02:09:49.000Z","dependencies_parsed_at":"2024-08-05T18:35:13.878Z","dependency_job_id":null,"html_url":"https://github.com/serihiro/practical_errors","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"47de99cf6480d5023dda51dd8ac7065ec6da9f12"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/serihiro/practical_errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serihiro%2Fpractical_errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serihiro%2Fpractical_errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serihiro%2Fpractical_errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serihiro%2Fpractical_errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serihiro","download_url":"https://codeload.github.com/serihiro/practical_errors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serihiro%2Fpractical_errors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265319579,"owners_count":23746364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["error-handling","rails","ruby","ruby-gem"],"created_at":"2025-03-30T09:18:05.566Z","updated_at":"2026-05-18T15:37:02.735Z","avatar_url":"https://github.com/serihiro.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/practical_errors.svg)](https://badge.fury.io/rb/practical_errors)\n\n# PracticalErrors\n\nMake rails error messages more practical.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'practical_errors'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install practical_errors\n\n## Usage\n\nAdd `include PracticalErrors::Practicable` to your controller.\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  # Prevent CSRF attacks by raising an exception.\n  # For APIs, you may want to use :null_session instead.\n  protect_from_forgery with: :exception\n  \n  include PracticalErrors::Practicable\nend\n```\n\nAnd then, error message will be like this:\n\n```\nActiveRecord::RecordNotFound (\n========== Practical Errors appends message from here ==========\n\nRails says, \"Couldn't find Post with 'id'=1000\".\n\nYou might have called ActiveRecord::FinderMethods#find, but the record for provided id was not found.\nIf you DO NOT want to raise ActiveRecord::RecordNotFound even if the record was not found,\nyou should use ActiveRecord::FinderMethods#find_by instead.\n\nPost.find(1000) # raise ActiveRecord::RecordNotFound\nPost.find_by(id: 1000) # just returns nill\n\n\n========== Practical Errors appends message to here ==========\nSee more detail about Practical Errors: https://github.com/serihiro/practical_errors\n\n):\n```\n\n\n### Supported error list\n- `ActiveRecord::RecordNotFound`\n- `ActiveRecord::RecordNotUnique`\n\nDo you think that there is little error that support?\nPlease add !! (I will continue to increase supported errors, of course.)\n\n## Dependency\n- Rails '\u003e= 4.0.0', '\u003c 5.0'\n- [error_arranger](https://github.com/serihiro/error_arranger) '0.1.0'\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/practical_errors. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserihiro%2Fpractical_errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserihiro%2Fpractical_errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserihiro%2Fpractical_errors/lists"}