No built-in error handler
KaymeKaydex opened this issue · 6 comments
now there are times when tarantool comes up with an error of the format "type":"ShardingError","name":"OBJECT_IS_OUTDATED","message":"Object is outdated after module reload\/reconfigure. Use new instance.","code": 20
but the library lacks parsing and typing of these errors, which is why errors.Is and errors.As error handling cannot be done
Hello. Which module is a producer for this error? How to get this error in practice? Do you have a reproducer?
Hello. Which module is a producer for this error? How to get this error in practice? Do you have a reproducer?
there is vshard error https://github.com/tarantool/vshard/blob/master/vshard/error.lua#L104
maybe we can add golang types for map this errors?
Thank you. How could I get an error in the Go code?
Trying to parse all errors from all modules in the connector doesn't sound like a very good idea to me. This is difficult to implement and maintain (the connector can be used with different Tarantools and modules versions). Therefore, we provide only general code, and a user of the connector must implement such specific things on its side.
This means casting the error to .(tarantool.Error) and further code analysis and error message?
Unfortunately, I don't know how you get this error and what data structure are you working with. So I cannot answer your question.
Please describe how you get this error in Go code and what it is (any error type, o just raw map, o something else?) first.
There is no activity here and the issue is not clear.