abpframework/abp · error · Exception
Remote server returns '{statusCode}-{reasonPhrase}'. {remote
Error message
Remote server returns '{statusCode}-{reasonPhrase}'. {remoteServiceErrorMessage} What it means
Thrown by `RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync` when an HTTP response from abp.io is not successful and the status code is not in the handled set. The message combines the numeric status code, reason phrase, and any error message parsed from the remote `RemoteServiceErrorResponse` body. It is a raw `Exception`.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs:45
{
return;
}
if (responseMessage.IsSuccessStatusCode)
{
return;
}
var exceptionMessage = "Remote server returns '" + (int)responseMessage.StatusCode + "-" +
responseMessage.ReasonPhrase + "'. ";
var remoteServiceErrorMessage = await GetAbpRemoteServiceErrorAsync(responseMessage);
if (remoteServiceErrorMessage != null)
{
exceptionMessage += remoteServiceErrorMessage;
}
throw new Exception(exceptionMessage);
}
public async Task<string> GetAbpRemoteServiceErrorAsync(HttpResponseMessage responseMessage)
{
RemoteServiceErrorResponse errorResult;
try
{
errorResult = _jsonSerializer.Deserialize<RemoteServiceErrorResponse>(
await responseMessage.Content.ReadAsStringAsync()
);
}
catch (Exception ex) when (IsJsonException(ex))
{
return null;
}
if (errorResult?.Error == null)
{View on GitHub (pinned to 7ed43b1931)
Solutions
- Retry after a short wait for transient 5xx/502/503 errors.
- Check status.abp.io / community channels for an ongoing outage.
- For 404, ensure the CLI is up to date (`dotnet tool update -g Volo.Abp.Cli`) so it calls the correct endpoints.
- Inspect the remote service error in the message for endpoint-specific guidance.
Defensive patterns
Strategy: retry
Validate before calling
// Optional pre-flight to surface outages early.
using var probe = await client.GetAsync(url, token);
if ((int)probe.StatusCode >= 500)
Console.Error.WriteLine($"Remote returned {probe.StatusCode}; consider retrying later."); Try / catch
for (int attempt = 0; attempt < 3; attempt++)
{
try { await remoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response); break; }
catch (Exception ex) when (ex.Message.StartsWith("Remote server returns") && attempt < 2)
{
await Task.Delay(TimeSpan.FromSeconds(Math.Pow(2, attempt)));
}
} Prevention
- Treat 5xx as transient and retry with backoff.
- Keep the CLI updated to call the current endpoints (avoid 404).
- Log the remote service error message for faster diagnosis.
When it happens
Trigger: Any CLI HTTP call to abp.io that returns an unhandled non-success status (e.g. 500, 502, 404) after specific status codes have been special-cased elsewhere.
Common situations: abp.io server error or outage; endpoint moved/removed (404); malformed remote response; transient gateway errors.
Related errors
- ERROR: Remote server returns '{response.StatusCode}'
- ERROR: Remote server returns '{response.StatusCode}'
- Use command: abp new Acme.BookStore -v version
- Remote server returns '{statusCode}-{reasonPhrase}'. {server
- Could not connect to ABP.IO MCP Server. The MCP server requi
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/aa837d536557f5dd.
Report an issue: GitHub.