Repository: microsoft/onefuzz
File: src/ApiService/ApiService/Functions/Pool.cs (C#)

Code before:
                "PoolCreate");
        }
        var newPool = await _context.PoolOperations.Create(name: create.Name, os: create.Os, architecture: create.Arch, managed: create.Managed, objectId: create.ObjectId);
        return await RequestHandling.Ok(req, await Populate(PoolToPoolResponse(newPool), true));
    }


    private async Task<HttpResponseData> Patch(HttpRequestData req) {
        var request = await RequestHandling.ParseRequest<PoolUpdate>(req);
        if (!request.IsOk) {
            return await _context.RequestHandling.NotOk(req, request.ErrorV, "PoolUpdate");
        }

        var answer = await _auth.CheckRequireAdmins(req);
        if (!answer.IsOk) {
            return await _context.RequestHandling.NotOk(req, answer.ErrorV, "PoolUpdate");
        }

        var update = request.OkV;
        var pool = await _context.PoolOperations.GetByName(update.Name);
        if (!pool.IsOk) {
            return await _context.RequestHandling.NotOk(
                req,
                new Error(
                    Code: ErrorCode.INVALID_REQUEST,
                    Errors: new string[] { "pool with that name does not exist exists" }),
                "PoolUpdate");
        }

        var updated = pool.OkV with { ObjectId = update.ObjectId };
        var updatePool = await _context.PoolOperations.Update(updated);
        if (updatePool.IsOk) {
            return await RequestHandling.Ok(req, await Populate(PoolToPoolResponse(updated), true));
        } else {
            return await _context.RequestHandling.NotOk(req, new Error(
                Code: ErrorCode.INVALID_REQUEST,
                Errors: new string[] { updatePool.ErrorV.Reason }), "PoolUpdate");
        }


    }

    private async Task<HttpResponseData> Get(HttpRequestData req) {
        var request = await RequestHandling.ParseRequest<PoolSearch>(req);
        if (!request.IsOk) {
            return await _context.RequestHandling.NotOk(req, request.ErrorV, "pool get");
        }

        var search = request.OkV;
        if (search.Name is not null) {
            var poolResult = await _context.PoolOperations.GetByName(search.Name);

Review comment (suggestion):
```suggestion
                    Errors: new string[] { "pool with that name does not exist" }),
```

Code after:
                "PoolCreate");
        }
        var newPool = await _context.PoolOperations.Create(name: create.Name, os: create.Os, architecture: create.Arch, managed: create.Managed, objectId: create.ObjectId);
        return await RequestHandling.Ok(req, await Populate(PoolToPoolResponse(newPool), true));
    }


    private async Task<HttpResponseData> Patch(HttpRequestData req) {
        var request = await RequestHandling.ParseRequest<PoolUpdate>(req);
        if (!request.IsOk) {
            return await _context.RequestHandling.NotOk(req, request.ErrorV, "PoolUpdate");
        }

        var answer = await _auth.CheckRequireAdmins(req);
        if (!answer.IsOk) {
            return await _context.RequestHandling.NotOk(req, answer.ErrorV, "PoolUpdate");
        }

        var update = request.OkV;
        var pool = await _context.PoolOperations.GetByName(update.Name);
        if (!pool.IsOk) {
            return await _context.RequestHandling.NotOk(
                req,
                new Error(
                    Code: ErrorCode.INVALID_REQUEST,
                    Errors: new string[] { "pool with that name does not exist" }),
                "PoolUpdate");
        }

        var updated = pool.OkV with { ObjectId = update.ObjectId };
        var updatePool = await _context.PoolOperations.Update(updated);
        if (updatePool.IsOk) {
            return await RequestHandling.Ok(req, await Populate(PoolToPoolResponse(updated), true));
        } else {
            return await _context.RequestHandling.NotOk(req, new Error(
                Code: ErrorCode.INVALID_REQUEST,
                Errors: new string[] { updatePool.ErrorV.Reason }), "PoolUpdate");
        }


    }

    private async Task<HttpResponseData> Get(HttpRequestData req) {
        var request = await RequestHandling.ParseRequest<PoolSearch>(req);
        if (!request.IsOk) {
            return await _context.RequestHandling.NotOk(req, request.ErrorV, "pool get");
        }

        var search = request.OkV;
        if (search.Name is not null) {
            var poolResult = await _context.PoolOperations.GetByName(search.Name);