Skip to content

Commit 41a9b06

Browse files
authored
Version 3.2.2 (#51)
* Fixed native library attribute setting * added support for 429 status code * Version update
1 parent 9b6c739 commit 41a9b06

File tree

8 files changed

+25
-7
lines changed

8 files changed

+25
-7
lines changed

CHANGELOG.md

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

3+
## Version 3.2.2
4+
- Fixed native iOS attributes
5+
36
## Version 3.2.1
47
- Android stack trace parser improvements,
58
- Fixed Android NDK initialization when database directory doesn't exist,

Runtime/BacktraceClient.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ private void Awake()
327327

328328
private void OnDestroy()
329329
{
330-
Debug.Log("Disabling Backtrace integration");
331330
Enabled = false;
332331
Application.logMessageReceived -= HandleUnityMessage;
333332
}
@@ -508,7 +507,7 @@ record = Database.Add(data);
508507
if (record != null)
509508
{
510509
record.Dispose();
511-
if (result.Status == BacktraceResultStatus.Ok && Database != null)
510+
if (Database != null && result.Status != BacktraceResultStatus.ServerError)
512511
{
513512
Database.Delete(record);
514513
}
@@ -620,6 +619,10 @@ private void SendUnhandledException(BacktraceUnhandledException exception)
620619

621620
private bool ShouldSendReport(Exception exception, List<string> attachmentPaths, Dictionary<string, string> attributes)
622621
{
622+
if(!Enabled)
623+
{
624+
return false;
625+
}
623626
// guess report type
624627
var filterType = ReportFilterType.Exception;
625628
if (exception is BacktraceUnhandledException)

Runtime/BacktraceDatabase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private void SendData(BacktraceDatabaseRecord record)
399399
StartCoroutine(
400400
BacktraceApi.Send(backtraceData, record.Attachments, queryAttributes, (BacktraceResult sendResult) =>
401401
{
402-
if (sendResult.Status == BacktraceResultStatus.Ok)
402+
if (sendResult.Status != BacktraceResultStatus.ServerError)
403403
{
404404
Delete(record);
405405
}

Runtime/Model/BacktraceData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class BacktraceData
4545
/// <summary>
4646
/// Version of the C# library
4747
/// </summary>
48-
public const string AgentVersion = "3.2.1";
48+
public const string AgentVersion = "3.2.2";
4949

5050
/// <summary>
5151
/// Application thread details

Runtime/Services/BacktraceApi.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,19 @@ public IEnumerator Send(string json, List<string> attachments, Dictionary<string
229229
yield return request.SendWebRequest();
230230

231231
BacktraceResult result;
232-
if (request.responseCode == 200 && (!request.isNetworkError || !request.isHttpError))
232+
if(request.responseCode == 429)
233+
{
234+
result = new BacktraceResult()
235+
{
236+
Message = "Server report limit reached",
237+
Status = Types.BacktraceResultStatus.LimitReached
238+
};
239+
if (OnServerResponse != null)
240+
{
241+
OnServerResponse.Invoke(result);
242+
}
243+
}
244+
else if (request.responseCode == 200 && (!request.isNetworkError || !request.isHttpError))
233245
{
234246
result = BacktraceResult.FromJson(request.downloadHandler.text);
235247

Runtime/Types/BacktraceResultStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public enum BacktraceResultStatus
77
{
88
/// <summary>
9-
/// Set when client limit is reached
9+
/// Set when client/server limit is reached
1010
/// </summary>
1111
LimitReached,
1212
/// <summary>

iOS/libBacktrace-Unity-Cocoa.a

1.59 MB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "io.backtrace.unity",
33
"displayName": "Backtrace",
4-
"version": "3.2.1",
4+
"version": "3.2.2",
55
"unity": "2017.1",
66
"description": "Backtrace's integration with Unity games allows customers to capture and report handled and unhandled Unity exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.",
77
"keywords": [

0 commit comments

Comments
 (0)