diff --git a/synapse/config/_base.py b/synapse/config/_base.py
index af9f17bf7b..1ab5593c6e 100644
--- a/synapse/config/_base.py
+++ b/synapse/config/_base.py
@@ -64,11 +64,12 @@ class Config(object):
if isinstance(value, int) or isinstance(value, long):
return value
second = 1000
- hour = 60 * 60 * second
+ minute = 60 * second
+ hour = 60 * minute
day = 24 * hour
week = 7 * day
year = 365 * day
- sizes = {"s": second, "h": hour, "d": day, "w": week, "y": year}
+ sizes = {"s": second, "m": minute, "h": hour, "d": day, "w": week, "y": year}
size = 1
suffix = value[-1]
if suffix in sizes:
diff --git a/synapse/config/password_auth_providers.py b/synapse/config/password_auth_providers.py
index f6d9bb1c62..1f438d2bb3 100644
--- a/synapse/config/password_auth_providers.py
+++ b/synapse/config/password_auth_providers.py
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from ._base import Config
+from ._base import Config, ConfigError
import importlib
@@ -39,7 +39,12 @@ class PasswordAuthProviderConfig(Config):
module = importlib.import_module(module)
provider_class = getattr(module, clz)
- provider_config = provider_class.parse_config(provider["config"])
+ try:
+ provider_config = provider_class.parse_config(provider["config"])
+ except Exception as e:
+ raise ConfigError(
+ "Failed to parse config for %r: %r" % (provider['module'], e)
+ )
self.password_providers.append((provider_class, provider_config))
def default_config(self, **kwargs):
|