{"id":25888308,"url":"https://github.com/jelder/faraday_error","last_synced_at":"2025-03-02T18:35:22.476Z","repository":{"id":56845540,"uuid":"52039433","full_name":"jelder/faraday_error","owner":"jelder","description":"A Faraday middleware for adding request parameters to your exception tracker.","archived":false,"fork":false,"pushed_at":"2016-02-22T18:04:19.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T03:47:06.707Z","etag":null,"topics":["exception-tracker","faraday","honeybadger","middleware"],"latest_commit_sha":null,"homepage":"","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/jelder.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}},"created_at":"2016-02-18T21:17:31.000Z","updated_at":"2016-11-16T17:40:23.000Z","dependencies_parsed_at":"2022-09-17T11:20:49.432Z","dependency_job_id":null,"html_url":"https://github.com/jelder/faraday_error","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelder%2Ffaraday_error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelder%2Ffaraday_error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelder%2Ffaraday_error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelder%2Ffaraday_error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jelder","download_url":"https://codeload.github.com/jelder/faraday_error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241553889,"owners_count":19981478,"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":["exception-tracker","faraday","honeybadger","middleware"],"created_at":"2025-03-02T18:35:21.851Z","updated_at":"2025-03-02T18:35:22.470Z","avatar_url":"https://github.com/jelder.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FaradayError\n[![Gem Version](https://badge.fury.io/rb/faraday_error.svg)](https://badge.fury.io/rb/faraday_error)\n\nA [Faraday](https://github.com/lostisland/faraday) middleware for adding request parameters to your exception tracker.\n\n### Supports\n - [Honeybadger](https://www.honeybadger.io/)\n - [NewRelic](http://newrelic.com/)\n - Your favorite thing, as soon as you make a pull request!\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'faraday_error'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install faraday_error\n\n## Usage\n\nConfigure your Faraday connection to use this middleware. You can optionally specify a name; defaults to `faraday`. It is expected that you also use `Faraday::Response::RaiseError` somewhere in your stack.\n```ruby\nconnection = Faraday.new(url: 'http://localhost:4567') do |faraday|\n  faraday.use       FaradayError::Middleware, name: \"example_request\"\n  faraday.use       Faraday::Response::RaiseError\n  faraday.adapter   Faraday.default_adapter\nend\n```\n\nAnd that's it. Make a request as you normally would.\n```ruby\nconnection.post do |req|\n  req.url '/503'\n  req.headers['Content-Type'] = 'application/json'\n  req.body = JSON.generate(abc: \"xyz\")\nend\n```\n\nIf any request fails, Honeybadger's \"context\" for this error will include your request parameters. If sending JSON or `application/x-www-form-urlencoded`, these will be included in parsed form.\n```json\n{\n  \"example_request\": {\n    \"method\": \"post\",\n    \"url\": \"http://localhost:4567/503\",\n    \"request_headers\": {\n      \"User-Agent\": \"Faraday v0.9.2\",\n      \"Content-Type\": \"application/json\"\n    },\n    \"body_length\": 13,\n    \"body\": {\n      \"abc\": \"xyz\"\n    }\n  }\n}\n```\n\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\nThe included [RestReflector](../master/spec/rest_reflector.rb) Sinatra app is suitable for making requests that are guaranteed to fail in particlar ways.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/jelder/faraday_error. 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%2Fjelder%2Ffaraday_error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjelder%2Ffaraday_error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelder%2Ffaraday_error/lists"}