Skip to content

Commit 9c24146

Browse files
committed
Version 2.0.1: BacktraceApi will print Warning message instead of Error message
1 parent 8ca7901 commit 9c24146

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Backtrace Unity Release Notes
22

3+
4+
## Version 2.0.1
5+
- `BacktraceApi` won't print anymore Error message when Backtrace-integration cannot send data to Backtrace. Now `BacktraceApi` will print warning instead.
6+
37
## Version 2.0.0
48
- Backtrace-Unity plugin will set `"Destroy object on new scene"` by default to false.
59
- Backtrace stack trace improvements,

src/Model/BacktraceData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public string ToJson()
123123
["lang"] = "csharp",
124124
["langVersion"] = "Unity",
125125
["agent"] = "backtrace-unity",
126-
["agentVersion"] = "2.0.0",
126+
["agentVersion"] = "2.0.1",
127127
["mainThread"] = MainThread,
128128
["classifiers"] = new JArray(Classifier),
129129
["attributes"] = Attributes.ToJson(),
@@ -169,7 +169,7 @@ private void SetReportInformation()
169169
Uuid = Report.Uuid;
170170
Timestamp = Report.Timestamp;
171171
LangVersion = "Mono/IL2CPP";
172-
AgentVersion = "2.0.0";
172+
AgentVersion = "2.0.1";
173173
Classifier = Report.ExceptionTypeReport ? new[] { Report.Classifier } : null;
174174
}
175175
}

src/Services/BacktraceApi.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private IEnumerator Send(string json, List<string> attachments, BacktraceReport
121121
private void PrintLog(UnityWebRequest request)
122122
{
123123
string responseText = Encoding.UTF8.GetString(request.downloadHandler.data);
124-
Debug.LogError($"[Backtrace]::Reponse code: {request.responseCode}, Response text: {responseText}" +
124+
Debug.LogWarning($"[Backtrace]::Reponse code: {request.responseCode}, Response text: {responseText}" +
125125
$"\n Please check provided url to Backtrace service or learn more from our integration guide: https://help.backtrace.io/integration-guides/game-engines/unity-integration-guide");
126126
}
127127

@@ -146,11 +146,7 @@ private IEnumerator SendAttachment(string rxId, Stack<string> attachments)
146146
request.SetRequestHeader("Content-Type", "application/json");
147147
yield return request.SendWebRequest();
148148

149-
if (request.responseCode == 200)
150-
{
151-
PrintLog(request);
152-
}
153-
else
149+
if(request.responseCode != 200)
154150
{
155151
PrintLog(request);
156152
}

0 commit comments

Comments
 (0)