smartcar / ios-sdk

Smartcar SDK for iOS.
https://smartcar.github.io/ios-sdk/
MIT License
19 stars 7 forks source link

Incorrect access level of AuthorizationError variables and inner ErrorType enum #62

Closed anashkevichp closed 3 years ago

anashkevichp commented 3 years ago

It looks like we have an incorrect access level of variables of AuthorizationError class as well as the inner ErrorType enum.

This is the current implementation:

@objc public class AuthorizationError: NSObject, Error {
    enum ErrorType {
        ...
    }

    var type: ErrorType
    var errorDescription: String?
    var vehicleInfo: VehicleInfo?

    init(type: ErrorType, errorDescription: String? = nil, vehicleInfo: VehicleInfo? = nil) {
        ...
    }
}

This implementation doesn't let to know anything about the instance of the AuthorizationError class because all variables have the internal access level.