{"id":16380992,"url":"https://github.com/anthonator/errawr-http","last_synced_at":"2025-10-25T20:12:12.032Z","repository":{"id":11968773,"uuid":"14541382","full_name":"anthonator/errawr-http","owner":"anthonator","description":"Raise 4xx and 5xx HTTP status code errors using Errawr","archived":false,"fork":false,"pushed_at":"2015-07-18T05:45:56.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T21:47:53.799Z","etag":null,"topics":[],"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/anthonator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T23:39:54.000Z","updated_at":"2023-03-17T12:03:11.000Z","dependencies_parsed_at":"2022-09-13T07:00:17.032Z","dependency_job_id":null,"html_url":"https://github.com/anthonator/errawr-http","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Ferrawr-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Ferrawr-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Ferrawr-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Ferrawr-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonator","download_url":"https://codeload.github.com/anthonator/errawr-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240035954,"owners_count":19737603,"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":[],"created_at":"2024-10-11T03:53:04.782Z","updated_at":"2025-10-25T20:12:11.952Z","avatar_url":"https://github.com/anthonator.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Errawr::HTTP\n\nRaise 4xx and 5xx HTTP status code errors using Errawr.\n\n[![Build Status](https://travis-ci.org/anthonator/errawr-http.png?branch=master)](https://travis-ci.org/anthonator/errawr-http) [![Dependency Status](https://gemnasium.com/anthonator/errawr-http.png)](https://gemnasium.com/anthonator/errawr-http) [![Coverage Status](https://coveralls.io/repos/anthonator/errawr-http/badge.png)](https://coveralls.io/r/anthonator/errawr-http) [![Code Climate](https://codeclimate.com/github/anthonator/errawr-http.png)](https://codeclimate.com/github/anthonator/errawr-http)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'errawr-http'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install errawr-http\n\n## Usage\n\n### Raise HTTP Error\n\n```ruby\nbegin\n  Errawr.error!(:bad_request)\nrescue =\u003e e\n  puts e.message # =\u003e Will return \"Bad Request\"\n  puts e.context[:http_status] # =\u003e Will return 400\nend\n```\n\n### Supported 4xx Status Codes\n\n| Message                          | HTTP Status Code | Symbol                           |\n| -------------------------------- | ---------------- | -------------------------------- |\n| Bad Request                      | 400              | :bad_request                     |\n| Unauthorized                     | 401              | :unauthorized                    |\n| Payment Required                 | 402              | :payment_required                |\n| Forbidden                        | 403              | :forbidden                       |\n| Not Found                        | 404              | :not_found                       |\n| Method Not Allowed               | 405              | :method_not_allowed              |\n| Not Acceptable                   | 406              | :not_acceptable                  |\n| Proxy Authentication Required    | 407              | :proxy_authentication_required   |\n| Request Timeout                  | 408              | :request_timeout                 |\n| Conflict                         | 409              | :conflict                        |\n| Gone                             | 410              | :gone                            |\n| Length Required                  | 411              | :length_required                 |\n| Precondition Failed              | 412              | :precondition_failed             |\n| Request Entity Too Large         | 413              | :request_entity_too_large        |\n| Request-URI Too Long             | 414              | :request_uri_too_long            |\n| Unsupported Media Type           | 415              | :unsupported_media_type          |\n| Request Range Not Satisfiable    | 416              | :requested_range_not_satisfiable |\n| Expectation Failed               | 417              | :expectation_failed              |\n| Unprocessable Entity             | 422              | :unprocessable_entity            |\n| Locked                           | 423              | :locked                          |\n| Failed Dependency                | 424              | :failed_dependency               |\n| Upgrade Required                 | 426              | :upgrade_required                |\n| Precondition Required            | 428              | :precondition_required           |\n| Too Many Requests                | 429              | :too_many_requests               |\n| Request Header Fields Too Large  | 431              | :request_header_fields_too_large |\n\n### Supported 5xx Status Codes\n\n| Message                          | HTTP Status Code | Symbol                           |\n| -------------------------------- | ---------------- | -------------------------------- |\n| Internal Server Error            | 500              | :internal_server_error           |\n| Not Implemented                  | 501              | :not_implemented                 |\n| Bad Gateway                      | 502              | :bad_gateway                     |\n| Service Unavailable              | 503              | :service_unavailable             |\n| Gateway Timeout                  | 504              | :gateway_timeout                 |\n| HTTP Version Not Supported       | 505              | :http_version_not_supported      |\n| Variant Also Negotiates          | 506              | :variant_also_negotiates         |\n| Insufficient Storage             | 507              | :insufficient_storage            |\n| Loop Detected                    | 508              | :loop_detected                   |\n| Not Extended                     | 510              | :not_extended                    |\n| Network Authentication Required  | 511              | :network_authentication_required |\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Credits\n\n[![Sticksnleaves](http://sticksnleaves-wordpress.herokuapp.com/wp-content/themes/sticksnleaves/images/snl-logo-116x116.png)](http://www.sticksnleaves.com)\n\nErrawr::HTTP is maintained and funded by [Sticksnleaves](http://www.sticksnleaves.com)\n\nThanks to all of our [contributors](https://github.com/anthonator/errawr-http/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Ferrawr-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonator%2Ferrawr-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Ferrawr-http/lists"}