 			connectTimeout: (
 				if _ldap_connect_timeout = process.env["SHARELATEX_LDAP_CONNECT_TIMEOUT"]
 					try
-						parseInt(_ldap_connect_timeout)
+						parseIntOrFail(_ldap_connect_timeout)
 					catch e
 						console.error "Cannot parse SHARELATEX_LDAP_CONNECT_TIMEOUT"
 				else

			acceptedClockSkewMs: (
				if _saml_skew = process.env["SHARELATEX_SAML_ACCEPTED_CLOCK_SKEW_MS"]
					try
						parseInt(_saml_skew)
					catch e
						console.error "Cannot parse SHARELATEX_SAML_ACCEPTED_CLOCK_SKEW_MS"
				else

			timeout: (
				if _ldap_timeout = process.env["SHARELATEX_LDAP_TIMEOUT"]
					try
						parseIntOrFail(_ldap_timeout)
					catch e
						console.error "Cannot parse SHARELATEX_LDAP_TIMEOUT"
				else
