Comments (6)
Hi! When an error occurs, we slurp up the error message and return it via an error
in the given Do
method (see errors.go). Do you need a different way of accessing error information?
from elastic.
Thanks for answering my question!
Sometimes i just need the Error Status in int or Error Message in string instead of returning a string with error status and messages both
from elastic.
Hey, thanks for bringing this up! I was returning a generic error. We can do better... :-)
You are now able to get the error details by "casting" to *elastic.Error
which I described here.
Let me know if it doesn't work for you.
from elastic.
Sorry, but it gives me an error
impossible type assertion:
*elastic.Error does not implement error (wrong type for Error method)
have Error() error
want Error() string
am i doing wrong?
from elastic.
Seems like you're using the old code. Did you go-get again, like go get -u github.com/olivere/elastic
?
from elastic.
sorry....my fault..forget to update
Thanks for your help!
from elastic.
Related Issues (20)
- Bulk index failures HOT 1
- I want to get the result body. Is there any way? HOT 1
- Generating nested histogram query HOT 1
- The es daterange query data has no expected effect
- how to get root cause with 400 error HOT 1
- ()elastic.Each Swallowed the error
- Unresolved reference 'Aggregation, Size, TrackTotalHits, Pretty, Sort, and Do'
- Append support max_concurrent_shard_requests in msearch
- Support for Version=0 in bulk_delete_request.go HOT 2
- The collapse query does not support multiple inner_hit conditions HOT 1
- elastic v6 not work correctly with http proxy
- elastic: Error 400 (Bad Request): only write ops with an op_type of create are allowed in data streams [type=illegal_argument_exception]
- Can't use REST compatibility headers
- The context field in the structure SearchSuggestionOption(in search.go) should change to be highlight
- How to search data with a 'knn query'?
- the return value of add document
- Issue with Elasticsearch Alias Removal and Addition
- cannot unmarshal object into Go struct field ProductHits.hits.total of type int
- EasyJson compatibility issue
- search without retry when es return io.EOF
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 elastic.