Closed wilkermichael closed 2 years ago
@eikenb I tried upgrading the library but it was causing a bunch of issues, if we go with this solution we can get the fix in faster.
This solution isn't completely out of left field, we do something similar in CTS when checking the errors returned from the Consul API Library, and I believe some other projects do similar things as well.
We can always upgrade the Consul API library in the future to be able to use the StatusError type. I'd like to do the same things in CTS eventually
Used method similar to CTS to extract the status code from error string
In the future, consul api library should be upgraded as there is a StatusError type that would allow for us not to rely on parsing a string.
Resolves #103