1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-08-31 12:42:00 +00:00

Removed obsolete attribute on Error.Code property, updated the description

This commit is contained in:
Jkorf 2025-08-22 16:12:01 +02:00
parent d92f3b7904
commit d0284c62c0
2 changed files with 4 additions and 4 deletions

View File

@ -470,10 +470,8 @@ namespace CryptoExchange.Net.Clients
error = ParseErrorResponse((int)response.StatusCode, response.ResponseHeaders, accessor, readResult.Error?.Exception);
}
#pragma warning disable CS0618 // Type or member is obsolete
if (error.Code == null || error.Code == 0)
error.Code = (int)response.StatusCode;
#pragma warning restore CS0618 // Type or member is obsolete
return new WebCallResult<T>(response.StatusCode, response.ResponseHeaders, sw.Elapsed, responseLength, OutputOriginalData ? accessor.GetOriginalString() : null, request.RequestId, request.Uri.ToString(), request.Content, request.Method, request.GetHeaders(), ResultDataSource.Server, default, error!);
}

View File

@ -11,9 +11,11 @@ namespace CryptoExchange.Net.Objects
private int? _code;
/// <summary>
/// The error code from the server
/// The int error code the server returned; or the http status code int value if there was no error code.<br />
/// <br />
/// <i>Note:</i><br />
/// The <see cref="ErrorCode"/> property should be used for more generic error checking; it might contain a string error code if the server does not return an int code.
/// </summary>
[Obsolete("Use ErrorCode instead", false)]
public int? Code
{
get