songkick/transport — pull request #5 by greysteil (2014-06-19 14:31:27+00:00)
Title: Allow customer user error codes on a per-client basis

Various frameworks are opinionated about the status codes they return for user-errors (e.g., Rails returns 422 for "validation failed" by default). This PR allows the status codes regarded as user-error to be set when initializing the client

client = Transport.new('http://localhost:4567',
:error_status_codes => [409, 422])

Largely lifted from https://github.com/songkick/transport/pull/2.