Coder Social home page Coder Social logo

Comments (2)

cmgrote avatar cmgrote commented on July 22, 2024

Hi @lcpopa -- agreed this should likely be more consistent, but to help get to the root of the inconsistencies it would be great if you could clarify with some specifics:

  • some specific examples of the methods you're using (you mention searching but the explanation is regarding instance GUIDs, which none of the search interfaces take as input, so I'm guessing you mean something like getEntityDetail?)
  • building on those same examples, which specific method(s) (in which implementations) seem to be returning which specific exceptions

I believe RepositoryErrorException is intended to be thrown when there is some unexpected error like the underlying repository being offline, so probably shouldn't be used in the case where we simply know that an instance does not exist; however, this simply means that for this specific scenario we may be able to avoid it -- it does not mean that in general it will never be thrown back to the OMAS even if we solve this inconsistency. For example, if the underlying e.g. IGC repository goes offline the proxy may still validly need to respond with RepositoryErrorException as it won't even be able to check whether the entity exists or not in IGC (since IGC is offline).

from egeria-connector-ibm-information-server.

lcpopa avatar lcpopa commented on July 22, 2024

Hi Chris,

Indeed the methods I am referring to are IGCOMRSMetadataCollection.getEntityDetail and EntityMapping.getEntityDetail. The first one will throw the EntityNotKnownException and the second the RepositoryErrorException

If we are to call with a non existent guid like 'mango', the EntityNotKnownException with code 4xx is thrown from IGCOMRSMetadataCollection.getEntityDetail:789

If we are to call with a non existent guid like 'kiwi@metadataCollectionId:papaya', the RepositoryErrorException with the 4xx code is thrown from EntityMapping.getEntityDetail:729. In order to pass the guid validation, it is important to have '@', and ':' in the proper order

We understand that we won't avoid RepoErEx in all cases, nor do we want that; when it is indeed the case it must be thrown. However, the callers (ex: omas) should get a consistent result since each exception is treated differently. In our case, the omas behaves as if IGC is down when the entity doesn't actually exists

Best wishes,
Liviu

from egeria-connector-ibm-information-server.

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.