Raise more appropriate exception (`ImproperlyConfigured`).