Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Dec 11, 2025

Summary

Removes the Keep-Alive header that was introduced in v1.23.1, which causes all API requests to fail in Node.js 18+ environments (including AWS Lambda).

The header Keep-Alive: timeout=200 is rejected by Node's undici HTTP client with InvalidArgumentError: invalid keep-alive header, causing requests to fail before they're even sent. This manifests as FlatfileError: fetch failed with status: 0.

Changes across 42 files:

  • Removed Keep-Alive header from all API request headers
  • Removed keepAlive option from Options and RequestOptions interfaces

Review & Testing Checklist for Human

  • Verify no Keep-Alive references remain: Run grep -r "Keep-Alive\|keepAlive" src/ to confirm complete removal
  • Test in Node.js 18+ environment: Make a simple API call to verify requests succeed without the header
  • Coordinate Fern generator fix: These are manual changes to generated code - they will be overwritten on next SDK generation. The underlying Fern TypeScript SDK generator configuration needs to be updated to prevent regression.

Recommended test plan: Install this branch in a Lambda function or Node 18+ project and verify API calls succeed where they previously failed with v1.23.1.

Notes

…ambda

The Keep-Alive header with default value 'timeout=200' was causing all API
requests to fail in Node.js environments (including AWS Lambda) because
Node's undici HTTP client rejects this header as invalid.

Error: InvalidArgumentError: invalid keep-alive header
  code: 'UND_ERR_INVALID_ARG'

This removes the Keep-Alive header from all API requests and the keepAlive
option from the Options and RequestOptions interfaces.

Fixes DEVXP-74

Co-Authored-By: christopher.harrison@flatfile.io <cnharrison@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Author

Closing due to inactivity for more than 7 days. Configure here.

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.

2 participants