From d2ebbbad8cf0cd2f7eaf66f49b9903e547d10076 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Sat, 30 Jan 2016 12:54:05 -0500 Subject: Fixed spacing with generic error details. --- bridge.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'bridge.go') 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, , not available.", + ErrResource = Error{3, "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, , not available for resource, ", + ErrMethod = Error{4, "Method, , not available for 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, , not available.", + ErrParamNA = Error{6, "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, , for 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, , is not modifiable", - `This will be returned if an attempt to modify a read only - parameter is made.`} + ErrParamStatic = Error{8, "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, ", + ErrorInternal = Error{901, "Internal error, ", `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 ) -- cgit v1.2.3