Throw error if database configuration is not defined