Back

[Closed] Stopping a cloud function

  • 0
  • Self Hosted
  • Flutter
  • Functions
punti_z
8 Dec, 2023, 09:32

I am writing a validation cloud function that performs multiple checks in sequence and when a check fails it writes error to DB and exits.

I exit using : return context.res

However for some reason function continues after the return statement and executes the remaining function.

I am using Dart 3.0. Can someone please confirm what's the correct way to ensure function execution stops.

Thanks

TL;DR
User is asking for help in stopping a cloud function after encountering a return statement. The function continues to execute despite the return statement. User is using Dart 3.0.
Drake
8 Dec, 2023, 10:39

It's not Appwrite specific. A return statement ends the execution of a function 🧐

punti_z
8 Dec, 2023, 13:10

I know.. Felt dumb just asking the question. Let me redo the function, its quite big so also often runs into the "curl internal error fails" .. Will update once I know more.

punti_z
8 Dec, 2023, 13:11

[Closed] Stopping a cloud function

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