Skip to content

Commit

Permalink
add sentry logging for keychain errors (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 authored Feb 11, 2020
1 parent 1aa3e32 commit 923987a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/model/keychain.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { captureException } from '@sentry/react-native';
import {
getInternetCredentials,
resetInternetCredentials,
Expand All @@ -13,6 +14,7 @@ export async function saveString(key, value, accessControlOptions) {
console.log(
`Keychain: failed to save string for key: ${key} error: ${err}`
);
captureException(err);
}
}

Expand All @@ -28,6 +30,7 @@ export async function loadString(key, authenticationPrompt) {
console.log(
`Keychain: failed to load string for key: ${key} error: ${err}`
);
captureException(err);
}
return null;
}
Expand All @@ -47,6 +50,7 @@ export async function loadObject(key) {
console.log(
`Keychain: failed to parse object for key: ${key} error: ${err}`
);
captureException(err);
}
return null;
}
Expand All @@ -59,5 +63,6 @@ export async function remove(key) {
console.log(
`Keychain: failed to remove value for key: ${key} error: ${err}`
);
captureException(err);
}
}

0 comments on commit 923987a

Please sign in to comment.