Skip to content

fix: increase HTTP request timeouts for ioBroker translations#195

Merged
AlCalzone merged 3 commits intomasterfrom
copilot/fix-translation-timeout-issue
Feb 24, 2026
Merged

fix: increase HTTP request timeouts for ioBroker translations#195
AlCalzone merged 3 commits intomasterfrom
copilot/fix-translation-timeout-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

ioBroker news translation can time out on larger changelog payloads with the existing request timing behavior. This PR adds longer timeouts for this use case: 30s for standard translation calls and 120s for the ioBroker translator endpoint.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] ioBroker translations times out</issue_title>
<issue_description>The default timeout for ky operations seems to bee to small. When trying to build a release with several changeloig entries translation aborts with an error:

edit:package updating package.json version from 1.6.0-alpha.0 to 1.6.0-alpha.1
edit:changelog Updating changelog in README.md
edit:changelog Updating changelog in CHANGELOG_OLD.md
edit:iobroker updating io-package.json version to 1.6.0-alpha.1
edit:iobroker updating news in io-package.json
edit:iobroker adding new news to io-package.json
edit:iobroker [FATAL] Could not translate the news: TimeoutError: Request timed out: POST https://translator.iobroker.in/translator

encreasing the timeout to i.e. 30s (30000) solves the problem:

async function translateWithIoBroker(textEN) {
    return ky
        .post(ioBrokerUrl, {
        body: new URLSearchParams({
            text: textEN,
            together: "true",
        }),
        timeout:30000,
    })
        .json();
}

Please encrease the timeout as far as possible, maybe 60s or more would be more save.

All modules at release 5.1.1
Example repo: iobroker-community-adapters/ioBroker.spotify-premium 1.6.0-alpha.1</issue_description>

<agent_instructions>Set the default request timeout for ky instances to 30 seconds. For the specific request to the ioBroker translator, set it to 120 seconds.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ioBroker translations timeout error Increase ky timeouts for ioBroker translations (30s default, 120s translator override) Feb 24, 2026
Copilot AI requested a review from AlCalzone February 24, 2026 10:24
@AlCalzone AlCalzone changed the title Increase ky timeouts for ioBroker translations (30s default, 120s translator override) fix: increase HTTP request timeouts for ioBroker translations Feb 24, 2026
Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
Copilot AI changed the title fix: increase HTTP request timeouts for ioBroker translations Inline translation timeouts per request and remove ky.extend usage Feb 24, 2026
@AlCalzone AlCalzone changed the title Inline translation timeouts per request and remove ky.extend usage fix: increase HTTP request timeouts for ioBroker translations Feb 24, 2026
@AlCalzone AlCalzone marked this pull request as ready for review February 24, 2026 11:12
@AlCalzone AlCalzone merged commit a143cdb into master Feb 24, 2026
14 checks passed
@AlCalzone AlCalzone deleted the copilot/fix-translation-timeout-issue branch February 24, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ioBroker translations times out

2 participants