Skip to content

Commit 5353ccb

Browse files
Erik Bylundkirre-bylund
authored andcommitted
Format internal errors as json
1 parent d8d13c3 commit 5353ccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/Client/LootLockerServerRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public class LootLockerResponseFactory
227227
return new T()
228228
{
229229
success = false,
230-
text = errorMessage,
230+
text = "{ \"message\": \"" + errorMessage + "\"}",
231231
statusCode = statusCode,
232232
errorData = new LootLockerErrorData() { message = errorMessage }
233233
};
@@ -254,7 +254,7 @@ public class LootLockerResponseFactory
254254
/// </summary>
255255
public static T RateLimitExceeded<T>(string method, int secondsLeftOfRateLimit) where T : LootLockerResponse, new()
256256
{
257-
return Error<T>(string.Format("Your request to {0} was not sent. You are sending too many requests and are being rate limited for {1} seconds", method, secondsLeftOfRateLimit));
257+
return Error<T>($"Your request to {method} was not sent. You are sending too many requests and are being rate limited for {secondsLeftOfRateLimit} seconds");
258258
}
259259
}
260260

0 commit comments

Comments
 (0)