go-hasql
go-hasql copied to clipboard
Return error with description when node of requested type is unavailable
Functions like Primary return node and nothing else. If nil is returned it is very hard to understand why exactly it happened - you have to parse logs (if you have those), etc.
We need another set of functions returning both node and error describing why exactly requested node is unavailable.
When we have enough API changes to warrant v2 we should think about removing old versions of these functions leaving only one variant.