diff --git a/Runtime/Extensions/HttpResponseMessageExtensions.cs b/Runtime/Extensions/HttpResponseMessageExtensions.cs index 51cdfd6..11d9681 100644 --- a/Runtime/Extensions/HttpResponseMessageExtensions.cs +++ b/Runtime/Extensions/HttpResponseMessageExtensions.cs @@ -15,7 +15,7 @@ public static async Task ReadAsStringAsync(this HttpResponseMessage resp if (!response.IsSuccessStatusCode) { - throw new HttpRequestException($"{methodName} Failed! HTTP status code: {response.StatusCode} | Response body: {responseAsString}"); + throw new HttpRequestException($"{methodName} Failed! HTTP status code: [{(int)response.StatusCode}] {response.StatusCode} | Response body: {responseAsString}"); } if (debug) @@ -31,7 +31,7 @@ public static async Task CheckResponseAsync(this HttpResponseMessage response, [ if (!response.IsSuccessStatusCode) { var responseAsString = await response.Content.ReadAsStringAsync(); - throw new HttpRequestException($"{methodName} Failed! HTTP status code: {response.StatusCode} | Response body: {responseAsString}"); + throw new HttpRequestException($"{methodName} Failed! HTTP status code:[{(int)response.StatusCode}] {response.StatusCode} | Response body: {responseAsString}"); } } } diff --git a/package.json b/package.json index 873e055..c386960 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Utilities.Rest", "description": "This package contains useful RESTful utilities for the Unity Game Engine.", "keywords": [], - "version": "1.4.5", + "version": "1.4.6", "unity": "2021.3", "documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation", "changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases", @@ -15,13 +15,13 @@ "author": "Stephen Hodgson", "url": "https://github.com/StephenHodgson", "dependencies": { - "com.utilities.async": "1.2.3", + "com.utilities.async": "1.3.0", "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.modules.unitywebrequestassetbundle": "1.0.0", "com.unity.modules.unitywebrequestaudio": "1.0.0", "com.unity.modules.unitywebrequesttexture": "1.0.0", "com.unity.modules.unitywebrequestwww": "1.0.0", - "com.unity.nuget.newtonsoft-json": "3.2.0" + "com.unity.nuget.newtonsoft-json": "3.2.1" }, "hideInEditor": true, "publishConfig": {