alphagov/rummageable — pull request #17 by JordanHatch (2014-03-21 15:32:39+00:00)
Title: Don't try and parse JSON when the response is empty

When the response from a request is empty (eg. when requests are stubbed out in a test), attempting to parse the response as JSON raises an exception.

This changes the log_response method to return an 'UNKNOWN' status if the response is empty, consistent with behaviour when the response is JSON but doesn't contain a result key.