Skip to content

Commit 42b37f5

Browse files
Erik Bylundkirre-bylund
authored andcommitted
Fixes after review of improved errors
1 parent f6e0bfe commit 42b37f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Runtime/Client/LootLockerBaseServerAPI.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ IEnumerator coroutine()
107107
if (!webRequest.isDone && timedOut)
108108
{
109109
LootLockerLogger.GetForLogLevel(LootLockerLogger.LogLevel.Warning)("Exceeded maxTimeOut waiting for a response from " + request.httpMethod + " " + url);
110-
OnServerResponse?.Invoke(LootLockerResponseFactory.Error<LootLockerResponse>(request.endpoint + " Timed out."));
110+
OnServerResponse?.Invoke(LootLockerResponseFactory.Error<LootLockerResponse>(request.endpoint + " Timed out.", 408));
111111
yield break;
112112
}
113113

@@ -206,9 +206,9 @@ IEnumerator coroutine()
206206
errorData.message = "Unknown error.";
207207
break;
208208
}
209+
errorData.message += " " + ObfuscateJsonStringForLogging(webRequest.downloadHandler.text);
209210
}
210-
errorData.message += " " + ObfuscateJsonStringForLogging(webRequest.downloadHandler.text);
211-
LootLockerLogger.GetForLogLevel(LootLockerLogger.LogLevel.Error)(errorData.message);
211+
LootLockerLogger.GetForLogLevel(LootLockerLogger.LogLevel.Error)(errorData.message + (!string.IsNullOrEmpty(errorData.doc_url) ? " -- " + errorData.doc_url : ""));
212212
OnServerResponse?.Invoke(response);
213213
}
214214
}

0 commit comments

Comments
 (0)