basho/riak_cs — pull request #697 by reiddraper (2013-10-10 21:12:15+00:00)
Title: Don't treat success as error for access stats

Webmachine 01f444cb75cbbe38420fcf08185c849ce5f169d7 introduced the
possibility of the response code being a two-tuple of HTTP code and a
custom 'reason'. Riak CS was not updated to support this, and so in
order to see if a response code was in the 500 HTTP range, we'd
accidently be comparing `{200, undefined} >= 500`, which incidentally,
returns true. This fix handles both integer HTTP codes and the new,
two-tuple format.

The bug manifested itself by having all operations in the access usage
statistics show up with the 'SystemError' prefix'.

Fixes #690