You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
@tannermeade, thanks for raising this issue! 🙏🏼 That change you're referring to should only apply to functions triggered by events, which should always be JSON.
👟 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?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: