{"record":{"id":"69d1b006bfc5e081","repo":"abpframework/abp","slug":"error-remote-server-returns-response-statuscode-69d1b0","errorCode":null,"errorMessage":"ERROR: Remote server returns '{response.StatusCode}'","messagePattern":"ERROR: Remote server returns '(.+?)'","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs","lineNumber":98,"sourceCode":"\n\n    private async Task<bool> CheckProLicenseAsync()\n    {\n        if (!AuthService.IsLoggedIn())\n        {\n            return false;\n        }\n\n        try\n        {\n            var url = $\"{CliUrls.AccountAbpIo}api/license/check-user\";\n            var client = _cliHttpClientFactory.CreateClient();\n\n            using (var response = await client.GetHttpResponseMessageWithRetryAsync(url, CancellationTokenProvider.Token, Logger))\n            {\n                if (!response.IsSuccessStatusCode)\n                {\n                    throw new Exception($\"ERROR: Remote server returns '{response.StatusCode}'\");\n                }\n\n                await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response);\n\n                var responseContent = await response.Content.ReadAsStringAsync();\n                return JsonSerializer.Deserialize<bool>(responseContent);\n            }\n        }\n        catch (Exception)\n        {\n            return false;\n        }\n    }\n}\n","sourceCodeStart":80,"sourceCodeEnd":113,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs#L80-L113","documentation":"Thrown inside CheckProLicenseAsync when the HTTP GET to account.abp.io/api/license/check-user returns a non-success status code. It is thrown inside a try whose catch(Exception) returns false, so callers see 'not licensed' rather than the message. It surfaces only via logs/attached debuggers; the meaningful signal is that Pro license verification could not complete against the remote server.","triggerScenarios":"Calling GetTemplateInfoAsync (or 'abp new' with a Pro template) while logged in, when the license-check endpoint returns 5xx, 401, or a network-layer failure (DNS, TLS, proxy) that yields a non-success HttpResponseMessage.","commonSituations":"abp.io outage or maintenance window; corporate proxy/firewall blocking account.abp.io; expired auth cookie causing 401; transient 5xx during deployment; offline run with no network.","solutions":["Verify network connectivity and that https://account.abp.io is reachable from your environment (curl the /api/license/check-user endpoint).","Re-run 'abp login <user>' to refresh credentials, then retry the command.","If behind a corporate proxy, configure the proxy for the CLI's HttpClient (HTTPS_PROXY / abp CLI proxy settings).","Retry after a transient outage; if the message is only logged you can proceed with a non-Pro template until the endpoint recovers."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Before Pro template creation, probe connectivity.\nusing var probe = new HttpClient();\ntry\n{\n    var r = await probe.GetAsync(\"https://account.abp.io/api/license/check-user\");\n    if (!r.IsSuccessStatusCode) Console.WriteLine(\"License endpoint unavailable; Pro creation may downgrade.\");\n}\ncatch { Console.WriteLine(\"No network; license check will return false.\"); }","typeGuard":null,"tryCatchPattern":"// The library already swallows this internally; treat 'not licensed' as the signal.\nvar isPro = await templateInfo.IsProLicensedAsync(); // returns false on any failure\nif (!isPro) { /* fall back to free template */ }","preventionTips":["Run license checks against a known-good network path before automated Pro-template creation.","Cache the login session so transient outages degrade gracefully to free templates.","In CI, fail the job fast if the license endpoint is unreachable rather than silently downgrading."],"tags":["network","licensing","transient","http"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}