mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Merge pull request #1246 from balena-io/1244-update-lock-weirdness
Don't wrap UpdatesLockedErrors with a detailed error
This commit is contained in:
commit
fbf4d8ac60
@ -774,17 +774,16 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit
|
||||
retryCount,
|
||||
});
|
||||
} catch (e) {
|
||||
const detailedError = new Error(
|
||||
if (e instanceof UpdatesLockedError) {
|
||||
// Forward the UpdatesLockedError directly
|
||||
throw e;
|
||||
}
|
||||
throw new Error(
|
||||
'Failed to apply state transition steps. ' +
|
||||
e.message +
|
||||
' Steps:' +
|
||||
JSON.stringify(_.map(steps, 'action')),
|
||||
);
|
||||
return this.applyError(detailedError, {
|
||||
force,
|
||||
initial,
|
||||
intermediate,
|
||||
});
|
||||
}
|
||||
}).catch(err => {
|
||||
return this.applyError(err, { force, initial, intermediate });
|
||||
|
Loading…
x
Reference in New Issue
Block a user