-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinkError Type mismatch #501
Comments
I'm having a similar error after upgrading to 10.5.0. 🍿 |
@lucidprojects - thanks for confirming this still exists. It's actually a bug in iOS LinkKit SDK @objc public static func createWithLinkTokenConfiguration(
_ linkTokenConfiguration: PLKLinkTokenConfiguration,
error: NSErrorPointer
) -> PLKHandler? {
let result = Plaid.create(linkTokenConfiguration.toSwift)
switch result {
case .success(let handler):
return PLKHandlerShim(handler: handler)
case .failure(let errorValue):
error?.pointee = errorValue.toObjC
}
return nil
} where extension Plaid.CreateError {
var toObjC: NSError {
switch self {
case .configurationError(let error):
return NSError(
domain: kPLKDefaultErrorDomain,
code: error.toObjC.rawValue,
userInfo: ["message": error.message]
)
}
}
} We should be returning a |
5 tasks
Resolved by #556 |
Released in V10.6.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
I'm purposefully passing a
null
linkToken to the tokenConfig so I can react to any errors from initialization. However, the error object shape I'm receiving is very different from theLinkExit.error
type and the Plaid Link documentation. Instead ofnull
, I also tried passing a random string (not a valid token) and got the same error object shape.In development environments this is fine, I can just react to
error.code
instead oferror.errorCode
.... However, for non-dev environments, the typescript compiler breaks at this point becausecode
doesn't exist on theLinkError
type. For now I'm just using a ts-ignore on that line, but that can't really be a long-term solution... especially since thecode
I'm seeing is "ECOM.PLAID.LINK0" which is not one ofLinkErrorCode
. I'm only seeing this on iOS right now, not testing on Android at the moment, so i don't know if it's also happening on Android.Am I just completely off on my expectations of this error?
Thank you in advance for your help!
Environment
Steps to Reproduce
Expected Result
I was expecting the error object to have the
LinkError
shape, as that is the expected type onLinkExit.error
Screenshots
N/A
Logs
N/A
Code To Reproduce Issue
The text was updated successfully, but these errors were encountered: