Skip to content

Commit af3604c

Browse files
use error objects
1 parent 63063e7 commit af3604c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎extensions/plugin-stack-persistence/src/composeStrategies.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function composeStrategies<
3939
if (data === null || typeof data !== "object") {
4040
return {
4141
ok: false,
42-
detail: "composed strategy metadata must be an object",
42+
detail: new Error("composed strategy metadata must be an object"),
4343
};
4444
}
4545

@@ -51,7 +51,7 @@ export function composeStrategies<
5151
) {
5252
return {
5353
ok: false,
54-
detail: "invalid composed strategy metadata schema",
54+
detail: new Error("invalid composed strategy metadata schema"),
5555
};
5656
}
5757

@@ -61,7 +61,7 @@ export function composeStrategies<
6161
) {
6262
return {
6363
ok: false,
64-
detail: "unsupported composed strategy metadata version",
64+
detail: new Error("unsupported composed strategy metadata version"),
6565
};
6666
}
6767

@@ -72,7 +72,7 @@ export function composeStrategies<
7272
) {
7373
return {
7474
ok: false,
75-
detail: "composed strategy metadata data must be an object",
75+
detail: new Error("composed strategy metadata data must be an object"),
7676
};
7777
}
7878

@@ -84,7 +84,7 @@ export function composeStrategies<
8484
) {
8585
return {
8686
ok: false,
87-
detail: "composed strategy metadata keys do not match",
87+
detail: new Error("composed strategy metadata keys do not match"),
8888
};
8989
}
9090

0 commit comments

Comments
 (0)