def METHOD_NAME(self, error_type, error_code, buffers=4, data=None):
    if not data:
        data = [[1, 2, 3, 4], [7, 9, 12]]
    stats_before = self.kphp_server.get_stats()
    resp = self.kphp_server.http_post(
        uri="/test_job_errors",
        json={
            "tag": "x2_with_error",
            "error-type": error_type,
            "data": data
        })
    self._assert_result(stats_before, resp, error_code, buffers, len(data))