Throw in case of other error types

This commit is contained in:
Alexandre Bodin 2021-09-27 10:36:21 +02:00
parent 8f92c78455
commit 036ade211b
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,8 @@ const createProvider = emailConfig => {
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
modulePath = providerName;
} else {
throw error;
}
}

View File

@ -45,6 +45,8 @@ const createProvider = config => {
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
modulePath = providerName;
} else {
throw error;
}
}