-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ConfigUseCase): log AppCheck failures (#466)
* feat(ConfigUseCase): log AppCheck failures * test(ConfigUseCase): Add test that sentry is called * fix: wire up sentry repo * fix(ConfigUseCase): use sentry repo for captureException * Update shared/src/commonMain/kotlin/com/mbta/tid/mbta_app/endToEnd/EndToEndRepositories.kt Co-authored-by: Melody Horn <[email protected]> * style(RepositoryDI): alphabetize * fix(E2ERepos): add sentry imports * fix(ContentViewModelTests): Mock sentry repo --------- Co-authored-by: Melody Horn <[email protected]>
- Loading branch information
1 parent
67e5841
commit bd5167f
Showing
7 changed files
with
89 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
shared/src/commonMain/kotlin/com/mbta/tid/mbta_app/repositories/SentryRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.mbta.tid.mbta_app.repositories | ||
|
||
import io.sentry.kotlin.multiplatform.Sentry | ||
|
||
interface ISentryRepository { | ||
|
||
fun captureMessage(msg: String) | ||
|
||
fun captureException(throwable: Throwable) | ||
} | ||
|
||
class SentryRepository : ISentryRepository { | ||
override fun captureMessage(msg: String) { | ||
Sentry.captureMessage(msg) | ||
} | ||
|
||
override fun captureException(throwable: Throwable) { | ||
Sentry.captureException(throwable) | ||
} | ||
} | ||
|
||
class MockSentryRepository : ISentryRepository { | ||
override fun captureMessage(msg: String) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun captureException(throwable: Throwable) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters