Git Product home page Git Product logo

Comments (1)

SanjayVas avatar SanjayVas commented on September 22, 2024

Parent not found -> FAILED_PRECONDITION

More clearly, the internal services shouldn't make a distinction about what's a "parent". This is something the public services do because they have a defined resource hierarchy where a resource's name may include a parent.

The distinction that internal services need to make is based upon whether the problem is that the entity being acted upon couldn't be found, vs. whether some other entity couldn't be found.

There's arguments both ways re: whether to use FAILED_PRECONDITION or NOT_FOUND from internal services when a "parent" entity isn't found. The main point is that internal services need to provide their callers with enough information to accurately return their own correct Status.

some resource other than parent or self not found -> INVALID_ARGUMENT

I think this should be FAILED_PRECONDITION. As per Status codes and their use in gRPC, INVALID_ARGUMENT is for when the arguments are incorrect regardless of the state of the system (e.g. some field is malformed or missing). In this case, the arguments could be correct if the entity with the given ID already existed. The fact that the system happens to always assign random IDs is irrelevant.

from cross-media-measurement.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.