mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Account for non-existent credential type
This commit is contained in:
parent
d70a5da262
commit
1af98bbe9d
|
@ -16,7 +16,11 @@ class CredentialTypesClass implements ICredentialTypesInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
getByName(credentialType: string): ICredentialType {
|
getByName(credentialType: string): ICredentialType {
|
||||||
return this.credentialTypes[credentialType].type;
|
try {
|
||||||
|
return this.credentialTypes[credentialType].type;
|
||||||
|
} catch (error) {
|
||||||
|
throw new Error(`Failed to find credential type: ${credentialType}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue