GithubHelp home page GithubHelp logo

Comments (4)

dennwc avatar dennwc commented on August 23, 2024 1

First, please switch to v3 branch. I will update it to support all specific errors returned by parsing code.

from go-client.

smola avatar smola commented on August 23, 2024

@dennwc Any progress here? This limits our ability to decide a sane logging policy on gitbase.

from go-client.

bzz avatar bzz commented on August 23, 2024

@mcarmonaa indeed, that was the case with old protocol. I belive there are no plans right now for changing it in v2.

But did you try latest https://gopkg.in/bblfsh/client-go.v3 ?

The protocol has been changed (see the DesignDoc for summary of the changes, including error handling), so a new version follows gRPC guldelines on error handling and error field of the response is reserved only for parsing issues.

from go-client.

smacker avatar smacker commented on August 23, 2024

bblfsh/web use-case:

resp, lang, err := cli.NewParseRequest()...UAST()

it looks like the error can be one of:

  • network error
  • any kind of internal grpc error
  • driver error (can’t parse source code)
  • bblfsh error (can’t create tree from the response)
  • ???

We need to show driver error to the user but hide anything else with friendly message Unexpected error contacting babelfish server. Please, try again. (because it’s internal error and the user can’t fix it by providing different source code / language)

please correct me if my assumptions about errors are wrong or if there are any other errors that make sense to handle differently.

from go-client.

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.