mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 18:56:24 +00:00
Improve the check for when the device has been provisioned but the supervisor doesn't have knowledge of it in its local state
This change improves the check for the DuplicateUuidError that can happen if a device has been provisioned but the API's response hasn't been persisted - the error message returned from the API has been known to have a few variations (usually an extra dot at the end), so we now use _.startsWith instead of checking for equal strings to make the supervisor still work under these variations. Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
d98897cdcf
commit
3f198fc6aa
@ -16,7 +16,7 @@ semverRegex = require('semver-regex')
|
||||
|
||||
userConfig = {}
|
||||
|
||||
DuplicateUuidError = message: '"uuid" must be unique.'
|
||||
DuplicateUuidError = (err) -> _.startsWith(err.message, '"uuid" must be unique')
|
||||
exports.ExchangeKeyError = class ExchangeKeyError extends TypedError
|
||||
|
||||
bootstrapper = {}
|
||||
|
Loading…
Reference in New Issue
Block a user