We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cbd222 commit 52788bcCopy full SHA for 52788bc
Source/VisualRecognitionV4/VisualRecognition.swift
@@ -57,11 +57,10 @@ public class VisualRecognition {
57
- parameter version: The release date of the version of the API to use. Specify the date
58
in "YYYY-MM-DD" format.
59
*/
60
- public init?(version: String) {
+ public init(version: String) throws {
61
self.version = version
62
- guard let authenticator = ConfigBasedAuthenticatorFactory.getAuthenticator(credentialPrefix: serviceSdkName) else {
63
- return nil
64
- }
+
+ let authenticator = try ConfigBasedAuthenticatorFactory.getAuthenticator(credentialPrefix: serviceSdkName)
65
self.authenticator = authenticator
66
67
if let serviceURL = CredentialUtils.getServiceURL(credentialPrefix: serviceSdkName) {
0 commit comments