JustArchiNET/ArchiSteamFarm · error · HttpRequestException
response is null!
Error message
response is null!
What it means
First guard inside the ArchiWebHandler inventory retry loop: if UrlGetToJsonObjectWithSession returns null (no HTTP response object at all), an HttpRequestException 'response is null!' is thrown immediately. This indicates the HTTP layer could not produce a response envelope, distinct from a server-returned error status.
Source
Thrown at ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:342
int rateLimitingDelay = (ASF.GlobalConfig?.InventoryLimiterDelay ?? GlobalConfig.DefaultInventoryLimiterDelay) * 1000;
while (true) {
Uri request = new(SteamCommunityURL, $"/inventory/{steamID}/{appID}/{contextID}?l={language}&count={itemsCountPerRequest}{(startAssetID > 0 ? $"&start_assetid={startAssetID}" : "")}");
await ASF.InventorySemaphore.WaitAsync().ConfigureAwait(false);
ObjectResponse<InventoryResponse>? response = null;
try {
for (byte i = 0; (i < WebBrowser.MaxTries) && (response?.Content is not { Result: EResult.OK } || !response.StatusCode.IsSuccessCode()); i++) {
if ((i > 0) && (rateLimitingDelay > 0)) {
await Task.Delay(rateLimitingDelay).ConfigureAwait(false);
}
response = await UrlGetToJsonObjectWithSession<InventoryResponse>(request, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors | WebBrowser.ERequestOptions.ReturnServerErrors | WebBrowser.ERequestOptions.AllowInvalidBodyOnErrors | WebBrowser.ERequestOptions.SteamWafWorkarounds, rateLimitingDelay: rateLimitingDelay).ConfigureAwait(false);
if (response == null) {
throw new HttpRequestException(Strings.FormatErrorObjectIsNull(nameof(response)));
}
if (response.StatusCode.IsClientErrorCode()) {
throw new HttpRequestException(Strings.FormatWarningFailedWithError(response.StatusCode), null, response.StatusCode);
}
if (response.StatusCode.IsServerErrorCode()) {
if (string.IsNullOrEmpty(response.Content?.ErrorText)) {
// This is a generic server error without a reason, try again
continue;
}
Bot.ArchiLogger.LogGenericDebug(Strings.FormatWarningFailedWithError(response.Content.ErrorText));
// Try to interpret the failure reason and see if we should try again
switch (response.Content.ErrorCode) {
case EResult.Busy:
case EResult.DuplicateRequest:View on GitHub (pinned to fe57c4129f)
Solutions
- Check ASF logs for the transport-level cause (proxy, TLS, DNS).
- Verify network connectivity and Steam community reachability.
- Retry; transient transport failures often clear.
- Correct any WebProxy / Proxy config in GlobalConfig.
Defensive patterns
Strategy: retry
Validate before calling
// Verify reachability before issuing the inventory request. if (!await webHandler.IsUrlReachable(SteamCommunityUrl)) return;
Try / catch
try { await foreach (var a in webHandler.GetInventoryAsync(steamID)) { /* ... */ } }
catch (HttpRequestException ex) when (ex.Message.Contains("response is null")) {
// transport failure; check proxy/connectivity, retry with backoff
} Prevention
- Validate proxy/DNS/TLS configuration in GlobalConfig.
- Retry transport nulls with exponential backoff.
- Monitor Steam community reachability from the host.
When it happens
Trigger: The web request returns a null ObjectResponse — e.g. request aborted, transport-level failure before any status code, or an internal helper returning null on a non-recoverable transport error.
Common situations: Network/DNS failure, TLS handshake failure, proxy misconfiguration, connection reset, or ASF's WebBrowser returning null for an unsupported/cancelled request.
Related errors
- Failed due to error: Client.IsConnected
- Failed due to error: {0}
- response is null!
- Failed!
- Failed due to error: {0}
AI-assisted analysis of JustArchiNET/ArchiSteamFarm@fe57c4129f (2026-08-13).
Data as JSON: /api/errors/2470d1713fea120d.
Report an issue: GitHub.