wvanbergen / http_status_exceptions Goto Github PK
View Code? Open in Web Editor NEWA Rails plugin to use exceptions for generating HTTP status responses.
Home Page: http://github.com/wvanbergen/http_status_exceptions/wiki
License: MIT License
A Rails plugin to use exceptions for generating HTTP status responses.
Home Page: http://github.com/wvanbergen/http_status_exceptions/wiki
License: MIT License
I am throwing an HTTPStatus::BadRequest
exception in my controller when a request is invalid. The server correctly replies with a 400 status code and whatever template I give it, but the log in the server console shows:
Started GET "/bla?arg=invalid" for 127.0.0.1 at 2011-08-11 20:14:21 -0400
Processing by BlasController#index as HTML
Parameters: {"arg"=>"invalid"}
Completed 500 Internal Server Error in 1ms
Rendered exceptions/bad_request.html.erb within layouts/application (4.0ms)
So everything is returned correctly, but an incorrect value shows up in the log. It isn't the biggest problem, since as far as the client is concerned, everything is normal. But the log messages aren't very useful, since there's no differentiation between the different kinds of exceptions raised.
Thanks for an awesome yet simple gem!
On a clean ec2onrails install, trying to install your latest version gives me the following error:
Error installing wvanbergen-http_status_exceptions:
wvanbergen-http_status_exceptions requires action_controller (>= 0, runtime)
Install 0.1.5 has no issues. Haven't looked into why this error is happening yet but wanted you to know.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.