-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
👟 Reproduction steps
This change creates a big problem (at least for dart cloud functions): #6317
Change is here: https://github.com/open-runtimes/open-runtimes/blob/2a069cf9bec98e18a096633b5848cde12b4fe319/runtime
By assuming that the body HAS to be json parseable, all cloud functions will throw an error if the request is not json.
So everyone who has existing functions that accept string request bodies or anything not json parsable (or anyone who wants to in the future) can no longer do that.
All changes to make this work going forward require not only backend refactors, but frontend changes too.
It would be really nice if cloud functions stop assuming things like this. The recent big change helped reduce these assumptions by a lot, but this is still an issue.
👍 Expected behavior
The recent big change to cloud functions was in-part to reduce the assumptions appwrite makes and let the developer make those decisions. v1.4.4 introduced a breaking assumption that should not be introduced. At least wrap it in a try catch, but preferably just don't try to parse the body so the function doesn't do unnecessary work if the developer doesn't what it to.
👎 Actual Behavior
Breaks all cloud functions that don't have json parseable bodies. The breaking change requires fronend and backend changes.
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct