OpenFn / OpenFn/adaptors

common http: set a low timeout on requests

Open
#623 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
24
Forks
41
Avg merge
3d 13h
Merged PRs (30d)
12

Description

We should be default set quite a low timeout on requests, maybe 20 seconds.

This means that if the backend service is unavailable, you're more likely to get a "request timed out" adaptor error than for the whole job to be killed without any feedback at all.

We've seen problems today where the backend service returns a 502 errror after a minute or something, but the run never sees that because it was killed before. Resulting in a frustrating user experience.

In the event of a http timeout, the error message should say something like "set the timeout option to change the timeout duration`. Although if we do that in common, we don't know what the actual adaptor's API is. So we need to think about that - the point is to nudge the user to making a simple fix if they have long requests.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Inspect the common HTTP request path and how adaptor APIs expose options, then reproduce an unavailable backend or delayed 502 response. Done means requests use a low default timeout, timeout failures provide actionable feedback, and longer requests can override it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.