Skip to content

Commit

Permalink
Merge pull request #2018 from DataDog/nogorodnikov/rum-4359/add-statu…
Browse files Browse the repository at this point in the history
…s-code-in-unknown-error-log-message

RUM-4359: Add status code in user-facing message in case of `UnknownError` during batch upload
  • Loading branch information
0xnm committed May 2, 2024
2 parents 2adb85c + 6d10b15 commit d9e9cad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ internal sealed class UploadStatus(val shouldRetry: Boolean = false, val code: I
is UnknownError -> logger.log(
InternalLogger.Level.ERROR,
InternalLogger.Target.USER,
{ "$batchInfo failed because of an unknown error; the batch was dropped." }
{ "$batchInfo failed because of an unknown error (status code = $code); the batch was dropped." }
)

is RequestCreationError -> logger.log(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ internal class UploadStatusTest {
InternalLogger.Level.ERROR,
InternalLogger.Target.USER,
"Batch [$fakeByteSize bytes] ($fakeContext) failed " +
"because of an unknown error; the batch was dropped."
"because of an unknown error (status code = ${status.code}); the batch was dropped."
)
}

Expand Down

0 comments on commit d9e9cad

Please sign in to comment.