@@ -96,7 +96,7 @@ const PasskeyListScreen = () => {
96
96
97
97
const deletePasskeyRes = await getConnectService ( ) . manageDelete ( deleteToken , credentialsId ) ;
98
98
if ( deletePasskeyRes . err ) {
99
- return handleSituation ( PasskeyListSituationCode . CboApiNotAvailableDuringDelete ) ;
99
+ return handleSituation ( PasskeyListSituationCode . CboApiNotAvailableDuringDelete , deletePasskeyRes . val ) ;
100
100
}
101
101
102
102
await getPasskeyList ( config , true ) ;
@@ -120,7 +120,7 @@ const PasskeyListScreen = () => {
120
120
const loadedMs = Date . now ( ) ;
121
121
const startAppendRes = await getConnectService ( ) . startAppend ( appendToken , loadedMs , undefined , true ) ;
122
122
if ( startAppendRes . err ) {
123
- return handleSituation ( PasskeyListSituationCode . CboApiNotAvailablePreAuthenticator ) ;
123
+ return handleSituation ( PasskeyListSituationCode . CboApiNotAvailablePreAuthenticator , startAppendRes . val ) ;
124
124
}
125
125
126
126
if ( ! startAppendRes . val . attestationOptions ) {
@@ -133,15 +133,15 @@ const PasskeyListScreen = () => {
133
133
134
134
const res = await getConnectService ( ) . completeAppend ( startAppendRes . val . attestationOptions ) ;
135
135
if ( res . err ) {
136
- if ( res . val instanceof PasskeyChallengeCancelledError ) {
137
- return handleSituation ( PasskeyListSituationCode . ClientPasskeyOperationCancelled ) ;
136
+ if ( res . val . type === ConnectErrorType . Cancel ) {
137
+ return handleSituation ( PasskeyListSituationCode . ClientPasskeyOperationCancelled , res . val ) ;
138
138
}
139
139
140
- if ( res . val instanceof ExcludeCredentialsMatchError ) {
141
- return handleSituation ( PasskeyListSituationCode . ClientExcludeCredentialsMatch ) ;
140
+ if ( res . val . type === ConnectErrorType . ExcludeCredentialsMatch ) {
141
+ return handleSituation ( PasskeyListSituationCode . ClientExcludeCredentialsMatch , res . val ) ;
142
142
}
143
143
144
- return handleSituation ( PasskeyListSituationCode . CboApiNotAvailablePostAuthenticator ) ;
144
+ return handleSituation ( PasskeyListSituationCode . CboApiNotAvailablePostAuthenticator , res . val ) ;
145
145
}
146
146
147
147
log . debug ( 'get passkey list' ) ;
@@ -164,7 +164,7 @@ const PasskeyListScreen = () => {
164
164
165
165
const passkeyList = await getConnectService ( ) . manageList ( listTokenRes , triggerSignalAllAccepted ) ;
166
166
if ( passkeyList . err ) {
167
- return handleSituation ( PasskeyListSituationCode . CboApiNotAvailableDuringInitialLoad ) ;
167
+ return handleSituation ( PasskeyListSituationCode . CboApiNotAvailableDuringInitialLoad , passkeyList . val ) ;
168
168
}
169
169
170
170
console . log ( 'passkeyList' , passkeyList . val . passkeys ) ;
0 commit comments