Skip to content

fix: omit empty headers on function createExecution - #3165

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
fix/omit-empty-execution-headers
Closed

fix: omit empty headers on function createExecution#3165
cursor[bot] wants to merge 1 commit into
mainfrom
fix/omit-empty-execution-headers

Conversation

@cursor

@cursor cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Summary

The Functions "Create execution" wizard always sent headers: {} when no header rows were filled. After utopia-http started preserving empty JSON objects as stdClass, cloud 1.9.6 rejects that value (Invalid headers param), so console executions fail even with no custom headers.

Omit headers when the built object is empty. Non-empty header maps are unchanged.

Server-side fix: appwrite#13237. Community: https://appwrite.io/threads/1538495966536278127 and https://appwrite.io/threads/1538338403840561152

Test plan

  • Create execution with no custom headers → succeeds
  • Create execution with one header → still sent and succeeds
  • Scheduled execution with empty headers → succeeds
Open in Web View Automation 

The execute wizard always sent headers: {} when no header rows were
filled. Cloud 1.9.6 rejects that empty object at validation, so console
executions failed with Invalid headers param.

Only pass headers when at least one name is set.

Related to appwrite#13237 / community threads on createExecution 400.

Co-authored-by: chiragaggarwal5k <chiragaggarwal5k@gmail.com>
@cursor
cursor Bot requested a review from ChiragAgg5k August 17, 2026 03:34
@cursor
cursor Bot marked this pull request as ready for review August 17, 2026 03:34
@appwrite

appwrite Bot commented Aug 17, 2026

Copy link
Copy Markdown

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Each function runs in its own isolated container with custom environment variables

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR prevents empty header maps from being sent when creating function executions, avoiding backend validation failures while preserving non-empty headers.

  • Sends undefined for headers when no named header rows exist.
  • Leaves custom headers and scheduled execution parameters unchanged.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The change narrowly converts an empty header map to the established undefined omission pattern while continuing to send populated headers unchanged.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte Correctly follows the repository's established optional-SDK-parameter convention to omit empty execution headers without changing non-empty header behavior.

Reviews (1): Last reviewed commit: "fix: omit empty headers on function crea..." | Re-trigger Greptile

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