HTTP request failed in 1C: causes and fixes
Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →
An HTTP request error in 1C is almost always a network problem, not a code problem: the host is not found, the port is closed, the server did not answer in time or the certificate check failed. The text after the colon comes from the network library and names the cause. Below is a breakdown by text and step-by-step checks.
First tell a network error from a server response
If Get or Post threw an exception, there was no response at all: the request did not arrive or did not come back. If an HTTPResponse with 400, 401, 404 or 500 came back, the network is fine and the server refused, so look at the code and body.
Check from the same server
The HTTP request runs where the code runs: on the 1C server for server calls and scheduled jobs. A check from your own browser says nothing about the 1C server. Run curl or ping from the 1C server machine under the same service account.

When the error is intermittent
If the request sometimes passes and sometimes times out, the usual causes are service load, a small HTTPConnection timeout or a proxy. Log the request time and response to the event log to see whether the time grows before failures.
By error text
| Text after the Internet error prefix | Meaning | Check |
|---|---|---|
| Couldn't resolve host name | Host name not found | Typo, https:// in the server name, DNS on the 1C server |
| Couldn't connect to server, Failed to connect | Port closed or unreachable | Port, firewall, VPN, proxy |
| Timeout was reached | No answer in time | HTTPConnection timeout, service load |
| SSL connect error | HTTPS handshake failed | OpenSSLSecureConnection present, TLS version |
| Peer certificate cannot be authenticated | Server certificate not trusted | CA certificates from the OS |
The exact text varies by platform version, but it is always a message from the network library that runs the request.

If a proxy is needed
Прокси = Новый ИнтернетПрокси(Истина); // настройки прокси системы
Соединение = Новый HTTPСоединение("api.example.com", 443, , , Прокси, 60,
Новый ЗащищенноеСоединениеOpenSSL(, Новый СертификатыУдостоверяющихЦентровОС));Scheduled jobs run under the 1C server service account, which may have different proxy settings than the user. That is why a manual request from the client works and the job does not.
Logging to see the cause
Начало = ТекущаяУниверсальнаяДатаВМиллисекундах();
Попытка
Ответ = Соединение.Получить(Запрос);
Исключение
ЗаписьЖурналаРегистрации("Обмен.HTTP", УровеньЖурналаРегистрации.Ошибка, , ,
СтрШаблон("Сеть: %1, адрес %2, %3 мс", КраткоеПредставлениеОшибки(ИнформацияОбОшибке()),
Запрос.АдресРесурса, ТекущаяУниверсальнаяДатаВМиллисекундах() - Начало));
ВызватьИсключение;
КонецПопытки;Status codes when the network is fine
| Code | Exchange cause |
|---|---|
| 400 | Wrong body or parameters: BOM, date format, empty field |
| 401 | Missing or wrong auth, expired token |
| 403 | Account lacks permissions |
| 404 | Wrong path, service not published |
| 500, 502, 503 | Error or outage on the service side |
More on 1C
Section overview and all guides: 1C integration via API: options, architecture and examples.
- OData in 1C: setup, queries and REST integration with examples
- 1C web services (SOAP): create, publish, WSDL and calls with examples
- Publishing 1C on IIS and Apache: step by step and common errors
- JSON in 1C:Enterprise: read, write, HTTP requests and common errors
- Unexpected character when reading JSON in 1C: causes and fixes
Frequently asked questions
What does the Internet error mean in 1C?
The request did not reach the server or did not return: host not found, port closed, timeout or certificate check failure. The text after the colon names the cause.
Why does it work from the client but not in a scheduled job?
The job runs on the 1C server under the service account, with different network, proxy and certificates.
How do I fix a certificate error?
Pass the OS certificate authorities to OpenSSLSecureConnection.
Repeat this on your own API
Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.
Download FreeDownload and first runNo sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.
References
Start with the linked example and compare its result with your own test requirement.