Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if execution response came from SDK #880

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

goodoldneon
Copy link
Contributor

Description

  • Error if the execution response did not come from the SDK.
  • Add stuff to the headers package.

Context

This change is needed because a non-SDK response with a 200 status results in a "successful" function run. This can happen when a proxy is misconfigured.

Testing

  • Function run succeeded when the execution response was from the SDK
  • Function run failed when the execution response was HTML

Type of change (choose one)

  • Chore (refactors, upgrades, etc.)
  • Bug fix (non-breaking change that fixes an issue)
  • Security fix (non-breaking change that fixes a potential vulnerability)
  • Docs
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

  • I've linked any associated issues to this PR.
  • I've tested my own changes.

Check our Pull Request Guidelines

Copy link

vercel bot commented Nov 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Nov 29, 2023 8:44pm

@goodoldneon
Copy link
Contributor Author

@jpwilliams which content type does the TS SDK use for streaming responses?

@jpwilliams
Copy link
Member

@goodoldneon: @jpwilliams which content type does the TS SDK use for streaming responses?

Still application/json - every response will always return Content-Type: application/json.

@goodoldneon goodoldneon marked this pull request as draft November 29, 2023 20:07
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.

None yet

3 participants