Skip to content
Back

executeFunction intermittently throws FormatException: Unexpected end of input due to empty HTTP 500

  • 0
  • 1
  • Flutter
  • Cloud
  • Realtime
  • Self Hosted
  • REST API
24 Jul, 2026, 12:59

Environment: Flutter app using the Appwrite Flutter SDK, calling executeFunction for [describe endpoint, e.g. live-stream-related function].

Description: Intermittently, calls to executeFunction fail with:

executeFunction [myEndpoint] HTTP 500: "" errore rete/parsing: FormatException: Unexpected end of input (at character 1)

The response body appears to be empty, so the SDK's jsonDecode() fails while trying to parse the error response. This happens under both normal use and load testing, is not consistently reproducible, and self-resolves after a few seconds — retrying the same call shortly after succeeds. The app does not crash or hang; it's isolated to this specific call failing once.

Question: Is this expected behavior when a function hits a timeout, cold start, or concurrency limit? Could the SDK/API return a proper JSON error body (or a distinct timeout error) instead of an empty 500, so it can be handled gracefully client-side?

TL;DR
Issue: Intermittent 500 error with empty response body and FormatException when calling executeFunction using Appwrite Flutter SDK. The problem might be due to a timeout, cold start, or concurrency limit. The SDK/API should return a proper JSON error body to handle the error gracefully client-side. Solution: This issue might self-resolve after a few seconds; retrying the same call shortly after could succeed.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more