Skip to content

Commit

Permalink
Format internal errors as json
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Bylund authored and kirre-bylund committed Sep 6, 2023
1 parent 0f55d0b commit 609ee27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Runtime/Client/LootLockerServerRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public class LootLockerResponseFactory
return new T()
{
success = false,
text = errorMessage,
text = "{ \"message\": \"" + errorMessage + "\"}",
statusCode = statusCode,
errorData = new LootLockerErrorData() { message = errorMessage }
};
Expand All @@ -254,7 +254,7 @@ public class LootLockerResponseFactory
/// </summary>
public static T RateLimitExceeded<T>(string method, int secondsLeftOfRateLimit) where T : LootLockerResponse, new()
{
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));
return Error<T>($"Your request to {method} was not sent. You are sending too many requests and are being rate limited for {secondsLeftOfRateLimit} seconds");
}
}

Expand Down

0 comments on commit 609ee27

Please sign in to comment.