Skip to content

Commit

Permalink
feat(mosip#695): show error code in ble error popup
Browse files Browse the repository at this point in the history
  • Loading branch information
tilak-puli committed May 4, 2023
1 parent ccb195c commit 93c079f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions machines/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,14 @@ export const scanMachine =
},
},

handlingBleError: {
on: {
DISMISS: {
target: '#request.clearingConnection',
},
},
},

invalid: {
on: {
DISMISS: {
Expand Down Expand Up @@ -751,6 +759,11 @@ export const scanMachine =
if (event.type === 'onDisconnected') {
callback({ type: 'DISCONNECT' });
}

if (event.type === 'onError') {
callback({ type: 'BLE_ERROR' });
console.error('BLE Exception: ' + event.message);
}
}
);

Expand Down

0 comments on commit 93c079f

Please sign in to comment.