arsduo/batch_api — pull request #14 by arsduo (2012-09-21 22:44:29+00:00)
Title: Allow flexible error codes

This pull request refactors the error infrastructure, changing Errors::Base to a more accurately named ErrorWrapper class, and cleaning up the class infrastructure.

This also allows errors raised to specify a status_code method, which will be used to generate the status code when rendered. This is used by 422-generating errors to signal that batch input is wrong, and could also be used to raise authentication errors with custom status codes (such as 403) via middleware (see #12).