Errors
balena.models.device.get(123).catch(function (error) {
if (error.code === balena.errors.BalenaDeviceNotFound.prototype.code) {
...
} else if (error.code === balena.errors.BalenaRequestError.prototype.code) {
...
}
});Last updated
Was this helpful?