Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.303.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.310.0" />
</ItemGroup>
<PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged.
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Online/API/APIAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private void attemptConnect()

userReq.Failure += ex =>
{
if (ex is APIException)
if (ex is APIException apiException && apiException.StatusCode < HttpStatusCode.InternalServerError)
{
LastLoginError = ex;
log.Add($@"Login failed for username {ProvidedUsername} on user retrieval ({LastLoginError.Message})!");
Expand Down
6 changes: 5 additions & 1 deletion osu.Game/Online/API/APIException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Net;

namespace osu.Game.Online.API
{
public class APIException : InvalidOperationException
{
public APIException(string message, Exception? innerException)
public HttpStatusCode? StatusCode { get; }

public APIException(string message, Exception? innerException, HttpStatusCode? statusCode = null)
: base(message, innerException)
{
StatusCode = statusCode;
}
}
}
2 changes: 1 addition & 1 deletion osu.Game/Online/API/APIRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public void Fail(Exception e)
// attempt to decode a displayable error string.
var error = JsonConvert.DeserializeObject<DisplayableError>(responseString);
if (error != null)
e = new APIException(error.ErrorMessage, e);
e = new APIException(error.ErrorMessage, e, WebRequest?.ResponseStatusCode);
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Online/API/OAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ internal void AuthenticateWithLogin(string username, string password)
// attempt to decode a displayable error string.
var error = JsonConvert.DeserializeObject<OAuthError>(accessTokenRequest.GetResponseString() ?? string.Empty);
if (error != null)
throwableException = new APIException(error.UserDisplayableError, ex);
throwableException = new APIException(error.UserDisplayableError, ex, accessTokenRequest.ResponseStatusCode);
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="ppy.osu.Framework" Version="2026.303.0" />
<PackageReference Include="ppy.osu.Framework" Version="2026.310.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2026.305.0" />
<PackageReference Include="Sentry" Version="5.1.1" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
Expand Down
2 changes: 1 addition & 1 deletion osu.iOS.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.303.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.310.0" />
</ItemGroup>
</Project>