I'm trying to return a custom status code (error 500) when a dart cloud function fails. Using the below doesn't seem to be working. Am I missing something?
res.json(
{"msg": "function failed"},
status: 500,
);
I haven't figured out how to return a failure from a cloud function without throwing an exception, which can cause the cloud function to run until it times out. Ideally, I'd like to figure out how to get the execution to have "failed" programmatically and the response code returned to the client have an HTTP status code of 500.
Next version of Functions will allow you to set a custom status code it will be executed a bit differently, but have full backward support. cc @Meldiron
Thanks Eldad! Really looking forward to the functions update! ๐ฅ๐
The next release of Functions is going to be an industry game changer. This is only a tiny piece of what to expect. ๐ค
I promised Tanner to share branch as soon as it is working, for QA ๐
Very cool!
hello folks, hope you are doing well.
Any idea of when this feature will be released?
I am trying to use QStash to handle retryings in case of any error on a appwrite function, but the api must return a error code. In my case it only returns 201 no matter what happens on the server side.
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...