Closed Ceroce closed 3 months ago
Hi Renaud.
Thanks for pointing this out. I agree this should be more convenient and you shouldn't have to rely on some string matching magic.
We'll try to add a dedicated error code in an upcoming version of the SDK.
Regards, Lukas
@mollidor is there anything new here? We have to face the same Problem with the SDK
Hi mfhaberlach,
Thank you for taking the time contacting us, could you please share your merchant id at integration@sumup.com. We would like to verify something in your account.
Many thanks.
Hi,
Currently when an OAuth 2 access token has expired, the error has a generic “code 20”. We need to know that it is indeed a token expiration error, so we can request a new access token to the OAuth server.
For example, when calling
SumUpSDK.login(withToken: accessToken, completion:)
, the error will be generic. Some code is needed to confirm it is a token expiration error:I also dislike it because it is bound to the current implementation of the SDK. This error may have a different content in the future, and the code above would not work anymore.
Maybe the SDK could return a specific code to identify this special case. E.g.
Thanks, Renaud