mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 13:47:54 +00:00
Don't wrap UpdatesLockedErrors with a detailed error
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
eca8fc9208
commit
dda6270219
@ -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…
Reference in New Issue
Block a user