Code review comment for lp:~fwereade/juju-core/errors-cleanup

Revision history for this message
William Reade (fwereade) wrote :

Reviewers: mp+168928_code.launchpad.net,

Message:
Please take a look.

Description:
errors: tests, consistency

We weren't testing or making sensible use of the embedded errors in
NotFoundError and UnauthorizedError; we were doing inappropriate things
with both error types in various situations; the action of NotFoundf was
not consistent with Unauthorizedf.

These conditions no longer apply; and the various charm.Repository types
in
play now produce errors.NotFoundError instead of charm.NotFoundError.

I'm also more than somewhat freaked out by the "auth fails" magic
string.
Can anyone explain that?

https://code.launchpad.net/~fwereade/juju-core/errors-cleanup/+merge/168928

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/9830049/

Affected files:
   A [revision details]
   M charm/repo.go
   M charm/repo_test.go
   M cmd/juju/deploy_test.go
   M cmd/juju/publish.go
   M cmd/juju/upgradecharm_test.go
   M cmd/jujud/agent_test.go
   M cmd/jujud/bootstrap_test.go
   M environs/dummy/storage.go
   M environs/ec2/storage.go
   M environs/imagemetadata/simplestreams.go
   M environs/local/storage.go
   M environs/maas/storage.go
   M environs/openstack/storage.go
   M environs/tools.go
   M environs/tools_test.go
   M errors/errors.go
   A errors/errors_test.go
   M state/apiserver/client_test.go
   M state/apiserver/errors_test.go
   M state/open.go
   M state/state_test.go
   M testing/charm.go

« Back to merge proposal