fix: Fix issue with some errors not being handled correctly (no-changelog) (#10371)

This commit is contained in:
Jon
2024-08-13 18:09:07 +01:00
committed by GitHub
parent 8e7d29ad3c
commit 1e310f40f7
2 changed files with 20 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ export abstract class NodeError extends ExecutionBaseError {
}
// if code is provided and it is in the list of common errors set the message and return early
if (code && COMMON_ERRORS[code.toUpperCase()]) {
if (code && typeof code === 'string' && COMMON_ERRORS[code.toUpperCase()]) {
newMessage = COMMON_ERRORS[code] as string;
messages.push(message);
return [newMessage, messages];