aboutsummaryrefslogtreecommitdiff
path: root/bridge.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-01-30 12:54:05 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-01-30 12:54:05 -0500
commitd2ebbbad8cf0cd2f7eaf66f49b9903e547d10076 (patch)
treed26572191f3e5c6a3edb034d7fa6ad191c177ceb /bridge.go
parent6665737855d6e30628591d71f6c32b6ce462b90d (diff)
Fixed spacing with generic error details.
Diffstat (limited to 'bridge.go')
-rw-r--r--bridge.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/bridge.go b/bridge.go
index 964b1f7..36fc104 100644
--- a/bridge.go
+++ b/bridge.go
@@ -50,15 +50,15 @@ type Error struct {
// http://www.developers.meethue.com/documentation/error-messages
var (
// Generic Errors
- ErrAuth = Error{1, "Unauthorized User",
+ ErrAuth = Error{1, "Unauthorized User",
`This will be returned if an invalid username is used in the request,
or if the username does not have the rights to modify the resource.`}
- ErrJson = Error{2, "Body contains invalid JSON.",
+ ErrJson = Error{2, "Body contains invalid JSON.",
"This will be returned if the body of the message contains invalid JSON."}
- ErrResource = Error{3, "Resource, <resource>, not available.",
+ ErrResource = Error{3, "Resource, <resource>, not available.",
`This will be returned if the addressed resource does not exist.
E.g. the user specifies a light ID that does not exist.`}
- ErrMethod = Error{4, "Method, <method_name>, not available for resource, <resource>",
+ ErrMethod = Error{4, "Method, <method_name>, not available for resource, <resource>",
`This will be returned if the method (GET/POST/PUT/DELETE)
used is not supported by the URL e.g. DELETE is not
supported on the /config resource`}
@@ -66,26 +66,26 @@ var (
required parameters are not present in the message body. The presence
of invalid parameters should not trigger this error as long as all
required parameters are present.`}
- ErrParamNA = Error{6, "Parameter, <parameter>, not available.",
+ ErrParamNA = Error{6, "Parameter, <parameter>, not available.",
`This will be returned if a parameter sent in the message body does
not exist. This error is specific to PUT commands; invalid parameters
in other commands are simply ignored.`}
ErrParamInvalid = Error{7, "Invalid value, <value>, for parameter, <parameter>",
`This will be returned if the value set for a parameter is of the
incorrect format or is out of range.`}
- ErrParamStatic = Error{8, "Parameter, <parameter>, is not modifiable",
- `This will be returned if an attempt to modify a read only
- parameter is made.`}
+ ErrParamStatic = Error{8, "Parameter, <parameter>, is not modifiable",
+ `This will be returned if an attempt to modify
+ a read only parameter is made.`}
ErrItemOverflow = Error{11, "Too many items to list.",
"List in request contains too many items"}
- ErrPortalConn = Error{12, "Portal connection required.",
+ ErrPortalConn = Error{12, "Portal connection required.",
`Command requires portal connection.
Returned if portalservices is “false“ or the portal connection is down`}
- ErrorInternal = Error{901, "Internal error, <error code>",
+ ErrorInternal = Error{901, "Internal error, <error code>",
`This will be returned if there is an internal error in the
processing of the command. This indicates an error in the
bridge, not in the message being sent.`}
-
+
// TODO: Command specific error numbers and descriptions
)