Skip to content

Commit 0ee218f

Browse files
committed
fix: cancellation error alignment (base & detail structure)
1 parent 6b4f899 commit 0ee218f

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

android/src/main/kotlin/com/sap/gigya_flutter_plugin/GigyaSDKWrapper.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,21 @@ class GigyaSDKWrapper<T : GigyaAccount>(application: Application, accountObj: Cl
586586
}
587587

588588
override fun onOperationCanceled() {
589-
currentResult?.error(CANCELED_ERROR, CANCELED_ERROR_MESSAGE, null)
589+
currentResult?.error(
590+
CANCELED_ERROR, CANCELED_ERROR_MESSAGE,
591+
mapOf(
592+
"callId" to "0",
593+
"statusCode" to 0,
594+
"errorMessage" to "Operation canceled",
595+
"errorCode" to CANCELED_ERROR
596+
)
597+
)
590598
}
591599

592600
override fun onConflictingAccounts(
593601
response: GigyaApiResponse,
594602
resolver: ILinkAccountsResolver
603+
595604
) {
596605
resolverHelper.linkAccountResolver = resolver
597606
currentResult?.error(
@@ -662,7 +671,8 @@ class GigyaSDKWrapper<T : GigyaAccount>(application: Application, accountObj: Cl
662671
currentResult?.error(
663672
CANCELED_ERROR,
664673
CANCELED_ERROR_MESSAGE,
665-
null)
674+
null
675+
)
666676
}
667677

668678
override fun onConflictingAccounts(
@@ -837,7 +847,7 @@ class GigyaSDKWrapper<T : GigyaAccount>(application: Application, accountObj: Cl
837847
override fun onHide(event: GigyaPluginEvent, reason: String?) {
838848
val data = event.eventMap.toMutableMap()
839849
data["reason"] = reason ?: "unknown"
840-
850+
841851
handler.addScreenSetEvent(
842852
mapOf(
843853
"event" to "onHide",

example/android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ android {
5858

5959
debug {
6060
signingConfig signingConfigs.debug
61-
minifyEnabled true
61+
minifyEnabled false
62+
shrinkResources false
6263
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
6364
}
6465

ios/Classes/GigyaSdkWrapper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PluginErrors {
3636
"statusCode": 0,
3737
"errorMessage": "Operation canceled"
3838
]
39-
return FlutterError(code: PluginErrors.generalError, message: data, details: details)
39+
return FlutterError(code: PluginErrors.unsupportedError, message: "Operation canceled", details: details)
4040
}
4141
else {
4242
let details: [String: Any] = [

0 commit comments

Comments
 (0)