code: function _Http_handleResponse(xhr, responseToResult) {
      var response = _Http_toResponse(xhr);
  
      if (xhr.status < 200 || 300 <= xhr.status) {
        response.body = xhr.responseText;
        return _Scheduler_fail(elm$http$Http$BadStatus(response));
      }
  
      var result = responseToResult(response);
  
      if (elm$core$Result$isOk(result)) {
        return _Scheduler_succeed(result.a);
      } else {
        response.body = xhr.responseText;
        return _Scheduler_fail(A2(elm$http$Http$BadPayload, result.a, response));
      }
    }
docs: RESPONSES