![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
balena-errors
Advanced tools
Collection of Balena JavaScript errors
Balena error collection
![Gitter](https://badges.gitter.im/Join Chat.svg)
The intention of this module is to provide a collection of Error
instances to be used by the Balena 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 Balena SDK instead.
While this module has not been formally deprecated,
we now believe that it is not good practice to add error classes to a separate module like
balena-errors
. Instead, error classes should be added to the same module that throws the
errors. The reason is that downstream applications (like the balena CLI) may end up with
multiple versions of balena-errors
in the node_modules
folder, in order to satisfy
dependencies' own dependencies (e.g. a dependency module requires balena-errors
v4, and
another dependency module requires balena-errors
v3). When this happens, testing error
instances with instanceof
fails: For example, an error class like BalenaExpiredToken
loaded from balena-errors
v4 would be considered incompatible (not the same class) as
BalenaExpiredToken
loaded from balena-errors
v3. And this leads to bugs...
Install balena-errors
by running:
$ npm install --save balena-errors
Kind: inner class of errors
Summary: Balena too many requests
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
nextValidRequestDate | String | next valid request string date |
Example
throw new errors.BalenaTooManyRequests()
Kind: inner class of errors
Summary: Balena invalid login credentials
Access: public
Kind: inner class of errors
Summary: Balena invalid device type
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
type | String | device type |
Example
throw new errors.BalenaInvalidDeviceType('raspberry-pi')
Kind: inner class of errors
Summary: Balena discontinued device type
Access: public
The device type that you specified is invalid because it is discontinued, and this operation is no longer supported.
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
type | String | device type |
Example
throw new errors.BalenaDiscontinuedDeviceType('edge')
Kind: inner class of errors
Summary: Balena malformed token
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
token | String | token |
Example
throw new errors.BalenaMalformedToken('1234')
Kind: inner class of errors
Summary: Balena settings permission error
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
error | Error | usually an EACCESS error |
Example
throw new errors.BalenaSettingsPermissionError()
Kind: inner class of errors
Summary: The device supervisor is locked
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
token | String | token |
Example
throw new errors.BalenaSupervisorLockedError()
Kind: inner class of errors
Summary: Balena expired token
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
token | String | token |
Example
throw new errors.BalenaExpiredToken('1234')
Kind: inner class of errors
Summary: Balena application not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
application | String | Number | application name or id |
Example
throw new errors.BalenaApplicationNotFound('MyApp')
Kind: inner class of errors
Summary: Balena fleet not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
fleet | String | Number | fleet name or id |
Example
throw new errors.BalenaFleetNotFound('MyFleet')
Kind: inner class of errors
Summary: Balena release not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
release | String | Number | release commit or id |
Example
throw new errors.BalenaReleaseNotFound(123)
Kind: inner class of errors
Summary: Balena organization membership role not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
organizationMembershipRole | String | Number | organization membership role name or id |
Example
throw new errors.BalenaOrganizationMembershipRoleNotFound(123)
Kind: inner class of errors
Summary: Balena application membership role not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
applicationMembershipRole | String | Number | application membership role name or id |
Example
throw new errors.BalenaApplicationMembershipRoleNotFound(123)
Kind: inner class of errors
Summary: Balena fleet membership role not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
fleetMembershipRole | String | Number | fleet membership role name or id |
Example
throw new errors.BalenaApplicationMembershipRoleNotFound(123)
Kind: inner class of errors
Summary: Balena image not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
image | Number | image id |
Example
throw new errors.BalenaImageNotFound(123)
Kind: inner class of errors
Summary: Balena service not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
service | Number | service id |
Example
throw new errors.BalenaServiceNotFound(123)
Kind: inner class of errors
Summary: Balena device not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
device | String | Number | device name or id |
Example
throw new errors.BalenaDeviceNotFound('MyDevice')
Kind: inner class of errors
Summary: Balena organization not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
organization | String | Number | organization name or id |
Example
throw new errors.BalenaOrganizationNotFound('MyOrg')
Kind: inner class of errors
Summary: Balena ambiguous device
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
device | String | Number | device name or id |
Example
throw new errors.BalenaAmbiguousDevice('MyDevice')
Kind: inner class of errors
Summary: Balena ambiguous application
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
application | String | Number | application name or id |
Example
throw new errors.BalenaAmbiguousApplication('MyApp')
Kind: inner class of errors
Summary: Balena ambiguous fleet
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
fleet | String | Number | fleet name or id |
Example
throw new errors.BalenaAmbiguousFleet('MyFleet')
Kind: inner class of errors
Summary: Balena ambiguous release
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
release | String | release hash |
Example
throw new errors.BalenaAmbiguousRelease('7cf02a6')
Kind: inner class of errors
Summary: Balena key not found
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
key | String | Number | key name, id or value |
Example
throw new errors.BalenaKeyNotFound('MyKey')
Kind: inner class of errors
Summary: Balena request error
Access: public
Returns: Error
- error instance
Param | Type | Description |
---|---|---|
body | String | response body |
statusCode | Number | http status code |
[requestOptions] | Object | options used to make the request |
Example
throw new errors.BalenaRequestError('Unauthorized')
Kind: inner class of errors
Summary: Balena not logged in
Access: public
Kind: inner class of errors
Summary: Balena invalid parameter
Access: public
If you're having any problem, please raise an issue on GitHub and the Balena team will be happy to help.
Run the test suite by doing:
$ gulp test
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
$ gulp lint
The project is licensed under the Apache 2.0 license.
FAQs
Collection of Balena JavaScript errors
The npm package balena-errors receives a total of 71 weekly downloads. As such, balena-errors popularity was classified as not popular.
We found that balena-errors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.