You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
On the other hand EtcdKeyResponseHandler parses only some http status codes into EtcdException body.
This means that when I send a request to get not existing key, the etcd client returns EtcdException with error code 101. Contrary to this behavior, when I send a request using prevExist=false and the request fails, a new Exception is thrown containing message "412 Precondition Failed". I need to parse the text using HttpResponseStatus.parseLine in this case to discover what happen.
I would suggest to throw an EtcdException with proper error code in all cases when possible.
The text was updated successfully, but these errors were encountered:
You are right. It also seems that newer etcds respond with some different http codes in some situations. I will adapt code to always try to make an etcd exception.
This topic https://github.com/coreos/etcd/blob/master/Documentation/errorcode.md defines a set of possible error codes which can etcd server return to your request. The server returns both http status code and json body as well. The server does it even in error states.
On the other hand EtcdKeyResponseHandler parses only some http status codes into EtcdException body.
This means that when I send a request to get not existing key, the etcd client returns EtcdException with error code 101. Contrary to this behavior, when I send a request using prevExist=false and the request fails, a new Exception is thrown containing message "412 Precondition Failed". I need to parse the text using HttpResponseStatus.parseLine in this case to discover what happen.
I would suggest to throw an EtcdException with proper error code in all cases when possible.
The text was updated successfully, but these errors were encountered: