mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 18:56:24 +00:00
Add steps info to applyState error message
This helps to debug/diagnose problems with state application faster. Change-type: patch Signed-off-by: Roman Mazur <roman@balena.io>
This commit is contained in:
parent
023af863d2
commit
4895bb300a
@ -440,6 +440,9 @@ module.exports = class DeviceState extends EventEmitter
|
||||
.delay(nextDelay)
|
||||
.then =>
|
||||
@applyTarget({ force, initial, intermediate, skipLock, nextDelay, retryCount })
|
||||
.catch (err) =>
|
||||
detailedError = new Error('Failed to apply state transition steps. ' + err.message + ' Steps:' + JSON.stringify(_.map(steps, 'action')))
|
||||
@applyError(detailedError, { force, initial, intermediate })
|
||||
.catch (err) =>
|
||||
@applyError(err, { force, initial, intermediate })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user