mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-07-09 17:28:28 +00:00
fix(musicbrainz): Fix finding stage inputs in error causes
Some checks are pending
Publish Docker image to Dockerhub / test (push) Waiting to run
Publish Docker image to Dockerhub / Build OCI Images (push) Blocked by required conditions
Publish Docker image to Dockerhub / Build OCI Images-1 (push) Blocked by required conditions
Publish Docker image to Dockerhub / Merge OCI Images and Push (push) Blocked by required conditions
Some checks are pending
Publish Docker image to Dockerhub / test (push) Waiting to run
Publish Docker image to Dockerhub / Build OCI Images (push) Blocked by required conditions
Publish Docker image to Dockerhub / Build OCI Images-1 (push) Blocked by required conditions
Publish Docker image to Dockerhub / Merge OCI Images and Push (push) Blocked by required conditions
This commit is contained in:
parent
8b633dd901
commit
7d8b00ab22
1 changed files with 7 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ import TransformerManager from "./transforms/TransformerManager.js";
|
|||
import { getRoot } from "../ioc.js";
|
||||
import { nanoid } from "nanoid";
|
||||
import { isDebugMode } from "../utils.js";
|
||||
import { findCauseByReference } from "../utils/ErrorUtils.js";
|
||||
import { findCauseByFunc, findCauseByReference } from "../utils/ErrorUtils.js";
|
||||
import { hashObject, parseArrayFromMaybeString } from "../utils/StringUtils.js";
|
||||
import { playContentInvariantTransform } from "../utils/PlayComparisonUtils.js";
|
||||
import { MSCache } from "./Cache.js";
|
||||
|
|
@ -448,9 +448,12 @@ export default abstract class AbstractComponent extends AbstractInitializable {
|
|||
step.stageName = stageName;
|
||||
|
||||
if (err !== undefined) {
|
||||
if ('lifecycleInputs' in err) {
|
||||
step.inputs = clone(err.lifecycleInputs) as LifecycleInput[];
|
||||
delete err.lifecycleInputs;
|
||||
const lifecycleErrorContext = findCauseByFunc(err, (e) => 'lifecycleInputs' in e && e.lifecycleInputs !== undefined);
|
||||
if (lifecycleErrorContext !== undefined) {
|
||||
// @ts-expect-error it does exist
|
||||
step.inputs = clone(lifecycleErrorContext.lifecycleInputs) as LifecycleInput[];
|
||||
// @ts-expect-error it does exist
|
||||
delete lifecycleErrorContext.lifecycleInputs;
|
||||
}
|
||||
const merged = mergeSimpleError(err);
|
||||
step.error = merged;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue