diff --git a/helpers/register-data-store.js b/helpers/register-data-store.js index 930bb9f5..744279d4 100644 --- a/helpers/register-data-store.js +++ b/helpers/register-data-store.js @@ -136,7 +136,12 @@ module.exports = require('machine').build({ url += inputs.config.host + ':' + port + '/' + inputs.config.database; inputs.config.url = url; } - + + try { + new URL(inputs.config.url); + } catch (e) { + return exits.error(new Error('Invalid connection url: remember to use encodeURIComponent() encode special characters in your connection url')); + } // ╔═╗╦═╗╔═╗╔═╗╔╦╗╔═╗ ┌┬┐┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐ // ║ ╠╦╝║╣ ╠═╣ ║ ║╣ │││├─┤│││├─┤│ ┬├┤ ├┬┘