Comments (4)
First, please switch to v3
branch. I will update it to support all specific errors returned by parsing code.
from go-client.
@dennwc Any progress here? This limits our ability to decide a sane logging policy on gitbase.
from go-client.
@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.
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)
- Question: how to get the node's token and internal type HOT 10
- Parsing of >4mb file fails HOT 3
- Possibility to distinguish `ErrMissingDriver` HOT 7
- Context deadline exceeded parsing csharp HOT 5
- Unsupported language using C# as driver HOT 5
- How to calculate the number of immediate children of the node? HOT 7
- How to build nodes from scratch? HOT 4
- How to map nodes? HOT 2
- How to mutate nodes? HOT 2
- Nested XPath should not require *[1] HOT 3
- Add 'bblfsh-cli' binaries to the release assets HOT 4
- Transport closing when client is idle HOT 7
- Question: How do I read data from nodes? HOT 1
- Running bblfsh-cli without params return an "index out of range" error
- Fix an example HOT 2
- Add info about `bblfsh-cli` into the README.md
- `bblfsh-cli --help` gives help message two times
- v2 build fails HOT 3
- Question: how to serialize nodes.Node to protobuf? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-client.