Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 20, 2022
1 parent cbf4618 commit 97d79e7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/config/plugin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,17 @@ const normalizePluginConfigs = async function ({
})
const pluginInfosA = pluginInfos.map(normalizePluginInfo)
return { [name]: pluginInfosA }
} catch (cause) {
throw handlePluginsError(cause)
} catch (error) {
throw handlePluginsError(error)
}
}

const normalizePluginInfo = function ({ plugin, config }) {
return cleanObject({ ...plugin, config })
}

// Translate error classes from the plugins library to error classes from this
// library
const handlePluginsError = function (cause) {
return BaseError.switch(cause)
const handlePluginsError = function (error) {
return BaseError.switch(error)
.case(PluginLibError, PluginError)
.case(ConsumerError, UserError)
.default(UnknownError)
Expand Down

0 comments on commit 97d79e7

Please sign in to comment.