2.13.0 • Published 6 years ago

resin-errors v2.13.0

Weekly downloads
182
License
Apache-2.0
Repository
github
Last release
6 years ago

resin-errors

Resin.io error collection

npm version dependencies Build Status Build status Gitter(https://badges.gitter.im/Join Chat.svg) Sauce Test Status

Role

The intention of this module is to provide a collection of Error instances to be used by the Resin SDK.

THIS MODULE IS LOW LEVEL AND IS NOT MEANT TO BE USED BY END USERS DIRECTLY.

Unless you know what you're doing, use the Resin SDK instead.

Installation

Install resin-errors by running:

$ npm install --save resin-errors

Documentation

errors~ResinInvalidDeviceType

Kind: inner class of errors
Summary: Resin invalid device type
Access: public

new ResinInvalidDeviceType(type)

Returns: Error - error instance

ParamTypeDescription
typeStringdevice type

Example

throw new errors.ResinInvalidDeviceType('raspberry-pi')

errors~ResinDiscontinuedDeviceType

Kind: inner class of errors
Summary: Resin discontinued device type
Access: public

new ResinDiscontinuedDeviceType(type)

The device type that you specified is invalid because it is discontinued, and this operation is no longer supported.

Returns: Error - error instance

ParamTypeDescription
typeStringdevice type

Example

throw new errors.ResinDiscontinuedDeviceType('edge')

errors~ResinMalformedToken

Kind: inner class of errors
Summary: Resin malformed token
Access: public

new ResinMalformedToken(token)

Returns: Error - error instance

ParamTypeDescription
tokenStringtoken

Example

throw new errors.ResinMalformedToken('1234')

errors~ResinSupervisorLockedError

Kind: inner class of errors
Summary: The device supervisor is locked
Access: public

new ResinSupervisorLockedError(token)

Returns: Error - error instance

ParamTypeDescription
tokenStringtoken

Example

throw new errors.ResinSupervisorLockedError()

errors~ResinExpiredToken

Kind: inner class of errors
Summary: Resin expired token
Access: public

new ResinExpiredToken(token)

Returns: Error - error instance

ParamTypeDescription
tokenStringtoken

Example

throw new errors.ResinExpiredToken('1234')

errors~ResinApplicationNotFound

Kind: inner class of errors
Summary: Resin application not found
Access: public

new ResinApplicationNotFound(application)

Returns: Error - error instance

ParamTypeDescription
applicationString | Numberapplication name or id

Example

throw new errors.ResinApplicationNotFound('MyApp')

errors~ResinBuildNotFound

Deprecated

Kind: inner class of errors
Summary: Resin build not found
Access: public

new ResinBuildNotFound(build)

Returns: Error - error instance

ParamTypeDescription
buildNumberbuild id

Example

throw new errors.ResinBuildNotFound(123)

errors~ResinReleaseNotFound

Kind: inner class of errors
Summary: Resin release not found
Access: public

new ResinReleaseNotFound(release)

Returns: Error - error instance

ParamTypeDescription
releaseNumberrelease id

Example

throw new errors.ResinReleaseNotFound(123)

errors~ResinImageNotFound

Kind: inner class of errors
Summary: Resin image not found
Access: public

new ResinImageNotFound(image)

Returns: Error - error instance

ParamTypeDescription
imageNumberimage id

Example

throw new errors.ResinImageNotFound(123)

errors~ResinServiceNotFound

Kind: inner class of errors
Summary: Resin service not found
Access: public

new ResinServiceNotFound(service)

Returns: Error - error instance

ParamTypeDescription
serviceNumberservice id

Example

throw new errors.ResinServiceNotFound(123)

errors~ResinDeviceNotFound

Kind: inner class of errors
Summary: Resin device not found
Access: public

new ResinDeviceNotFound(device)

Returns: Error - error instance

ParamTypeDescription
deviceString | Numberdevice name or id

Example

throw new errors.ResinDeviceNotFound('MyDevice')

errors~ResinAmbiguousDevice

Kind: inner class of errors
Summary: Resin ambiguous device
Access: public

new ResinAmbiguousDevice(device)

Returns: Error - error instance

ParamTypeDescription
deviceString | Numberdevice name or id

Example

throw new errors.ResinAmbiguousDevice('MyDevice')

errors~ResinAmbiguousApplication

Kind: inner class of errors
Summary: Resin ambiguous application
Access: public

new ResinAmbiguousApplication(application)

Returns: Error - error instance

ParamTypeDescription
applicationString | Numberapplication name or id

Example

throw new errors.ResinAmbiguousApplication('MyApp')

errors~ResinKeyNotFound

Kind: inner class of errors
Summary: Resin key not found
Access: public

new ResinKeyNotFound(key)

Returns: Error - error instance

ParamTypeDescription
keyString | Numberkey name, id or value

Example

throw new errors.ResinKeyNotFound('MyKey')

errors~ResinRequestError

Kind: inner class of errors
Summary: Resin request error
Access: public

new ResinRequestError(body, statusCode, requestOptions)

Returns: Error - error instance

ParamTypeDescription
bodyStringresponse body
statusCodeNumberhttp status code
requestOptionsObjectoptions used to make the request

Example

throw new errors.ResinRequestError('Unauthorized')

errors~ResinNotLoggedIn

Kind: inner class of errors
Summary: Resin not logged in
Access: public

errors~ResinInvalidParameterError

Kind: inner class of errors
Summary: Resin invalid parameter
Access: public

Support

If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.

Tests

Run the test suite by doing:

$ gulp test

Contribute

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

$ gulp lint

License

The project is licensed under the Apache 2.0 license.

2.13.0

6 years ago

2.12.0

6 years ago

2.11.0

6 years ago

2.10.0

7 years ago

2.9.0

7 years ago

2.8.0

7 years ago

2.7.0

7 years ago

2.6.0

7 years ago

2.5.0

7 years ago

2.4.0

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago