Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12)

Unified Diff: state/apiserver/common/instanceidgetter.go

Issue 62230043: state/..., worker/..., utils/...: use errgo
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « state/apiserver/common/errors_test.go ('k') | state/apiserver/common/instanceidgetter_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/apiserver/common/instanceidgetter.go
=== modified file 'state/apiserver/common/instanceidgetter.go'
--- state/apiserver/common/instanceidgetter.go 2014-01-20 17:47:59 +0000
+++ state/apiserver/common/instanceidgetter.go 2014-02-12 18:03:05 +0000
@@ -4,6 +4,7 @@
package common
import (
+ "launchpad.net/juju-core/errors"
"launchpad.net/juju-core/instance"
"launchpad.net/juju-core/state"
"launchpad.net/juju-core/state/api/params"
@@ -29,7 +30,7 @@
func (ig *InstanceIdGetter) getInstanceId(tag string) (instance.Id, error) {
entity0, err := ig.st.FindEntity(tag)
if err != nil {
- return "", err
+ return "", wrap(err, errors.IsNotFoundError)
}
entity, ok := entity0.(state.InstanceIdGetter)
if !ok {
@@ -46,7 +47,7 @@
}
canRead, err := ig.getCanRead()
if err != nil {
- return result, err
+ return result, wrap(err)
}
for i, entity := range args.Entities {
err := ErrPerm
« no previous file with comments | « state/apiserver/common/errors_test.go ('k') | state/apiserver/common/instanceidgetter_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b