add an error check on consumeResponse