api should have error codes, currently having to sniff error message strings is fragile
Bug #1254790 reported by
Kapil Thangavelu
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
else we're introducing alot fragility into api consumers.
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju-core: | |
milestone: | none → 1.21-alpha2 |
Changed in juju-core: | |
milestone: | 1.21-alpha2 → 1.21-alpha3 |
Changed in juju-core: | |
milestone: | 1.21-alpha3 → 1.21-beta1 |
Changed in juju-core: | |
milestone: | 1.21-beta1 → 1.22 |
Changed in juju-core: | |
milestone: | 1.22 → 1.23 |
Changed in juju-core: | |
milestone: | 1.23 → none |
importance: | High → Medium |
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-11-25 20:43, Kapil Thangavelu wrote:
> Public bug reported:
>
> else we're introducing alot fragility into api consumers.
>
> ** Affects: juju-core Importance: Undecided Status: New
>
Many errors do have codes: api/params/ apierror. go
state/
const ( rScope = "cannot enter scope" rScopeYet = "cannot enter scope yet" ontention = "excessive contention" ordinates = "unit has subordinates" dUnits = "machine has assigned units"
CodeNotFound = "not found"
CodeUnauthorized = "unauthorized access"
CodeCannotEnte
CodeCannotEnte
CodeExcessiveC
CodeUnitHasSub
CodeNotAssigned = "not assigned"
CodeStopped = "stopped"
CodeHasAssigne
CodeNotProvisioned = "not provisioned"
CodeNoAddressSet = "no address set"
)
However, I think the Client API that was written for the GUI predates
us adding Codes to standard errors, so might not be using them.
John www.enigmail. net/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://
iEYEARECAAYFAlK WLGoACgkQJdeBCY SNAAMFJwCfSKln2 1mMFyDQ/ C2Z2R06sDvX UIBSODwJ8umUur+ +6
+qIAmwXEdUNzmtk
=WwTW
-----END PGP SIGNATURE-----