boxerror: details is not a subobject

This commit is contained in:
Girish Ramakrishnan
2025-10-17 20:25:46 +02:00
parent 0fb8914b67
commit 5bd6001f95
3 changed files with 19 additions and 15 deletions

View File

@@ -44,10 +44,12 @@ function makeTaskError(error, app) {
assert(error instanceof BoxError);
assert.strictEqual(typeof app, 'object');
// track a few variables which helps 'repair' restart the task (see also scheduleTask in apps.js)
error.details.taskId = app.taskId;
error.details.installationState = app.installationState;
return error.toPlainObject();
return {
message: error.message,
reason: error.reason,
taskId: app.taskId,
installationState: app.installationState
};
}
// updates the app object and the database