Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
apiserver/params: remove ClientError helper #4361
Conversation
howbazaar
reviewed
Feb 11, 2016
| @@ -4,7 +4,7 @@ | ||
| package rpc | ||
| import ( | ||
| - "fmt" | ||
| + "errors" |
|
LGTM, one suggestion you may want to look at. |
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
added a commit
that referenced
this pull request
Feb 11, 2016
jujubot
merged commit f1ca8c7
into
juju:master
Feb 11, 2016
davecheney
deleted the
davecheney:apiserver-params-remove-clienterror
branch
Feb 11, 2016
pushed a commit
to cherylj/juju
that referenced
this pull request
Feb 15, 2016
cherylj
referenced this pull request
Feb 15, 2016
Merged
lp1544796: Fix error checking in Restore #4421
added a commit
that referenced
this pull request
Feb 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
davecheney commentedFeb 10, 2016
Updates LP#1538583
api/apiclient.APICall was the sole caller of params.ClientError.
params.Client error would rewrite the error value iff it was
rpc.RequestError, claiming that it was leaking unnecessary information
to the caller, specfically the "request error: " prefix. In b4e2785
the error prefix was convered to an errors.Annotate wrapper removing
the requirement to convert the error type.
Now, by removing params.ClientError, we can also remove the
errors.Annotate wrapper as the type of the error tells us what it is.
So, callers get
a. A nice annotated backtrace using errors.Trace
b. Access to the original *rpc.RequestError to inspect if they want.