Skip to content

Commit 2ceb009

Browse files
committed
chores(Sentry): Remove useless captured sentry
1 parent bbc74a2 commit 2ceb009

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/ThreadController.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class ThreadController @Inject constructor(
301301

302302
if (apiResponse.isSuccess()) return@runCatching apiResponse.data
303303

304-
SentryLog.e(TAG, "Could not fetch SwissTransfer container")
304+
SentryLog.i(TAG, "Could not fetch SwissTransfer container")
305305
return@runCatching null
306306
}.getOrNull()
307307

app/src/main/java/com/infomaniak/mail/utils/LoginUtils.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class LoginUtils @Inject constructor(
123123
infomaniakLogin.deleteToken(
124124
okHttpClient = HttpClient.okHttpClientNoTokenInterceptor,
125125
token = apiToken,
126-
onError = { SentryLog.e("DeleteTokenError", "API response error: $it") },
126+
onError = { SentryLog.i("DeleteTokenError", "API response error: $it") },
127127
)
128128
}
129129

app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class LogoutUser @Inject constructor(
7878
appContext.getInfomaniakLogin().deleteToken(
7979
okHttpClient = HttpClient.okHttpClientNoTokenInterceptor,
8080
token = apiToken,
81-
onError = { SentryLog.e("DeleteTokenError", "API response error: $it") },
81+
onError = { SentryLog.i("DeleteTokenError", "API response error: $it") },
8282
)
8383
}
8484

app/src/main/java/com/infomaniak/mail/utils/extensions/AttachmentExtensions.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ object AttachmentExtensions {
167167
if (apiResponse.isSuccess() && apiResponse.data != null) {
168168
updateLocalAttachment(draftLocalUuid, apiResponse.data!!, draftController, realm)
169169
} else {
170-
SentryLog.e(
170+
val baseMessage = "Upload failed for attachment $localUuid"
171+
val errorMessage = "error : ${apiResponse.translatedError}"
172+
SentryLog.i(
171173
tag = ATTACHMENT_TAG,
172-
msg = "Upload failed for attachment $localUuid - error : ${apiResponse.translatedError} - data : ${apiResponse.data}",
174+
msg = "$baseMessage - $errorMessage - data : ${apiResponse.data}",
173175
throwable = apiResponse.getApiException(),
174176
)
175177

0 commit comments

Comments
 (0)