Skip to content

Commit

Permalink
fix: assemble error (#11341)
Browse files Browse the repository at this point in the history
* fix: assemble error

* fix: assemble error
  • Loading branch information
jayzhang authored Apr 11, 2024
1 parent 7edc0e4 commit e4e0a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fx-core/src/error/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export function assembleError(e: any, source?: string): FxError {
return new UnhandledError(new Error(e as string), source);
} else {
const code = e.code as string;
if (code && (errnoCodes[code] || code.startsWith("ERR_"))) {
if (code && typeof code === "string" && (errnoCodes[code] || code.startsWith("ERR_"))) {
// convert to internal error
return new InternalError(e, source);
}
Expand Down

0 comments on commit e4e0a46

Please sign in to comment.