Invalid Error When Editing Server-side Action?

The following appears when editing the code for a server-side action. The action works fine, however, so I’m puzzled. Should the error not appear, or am I misunderstanding what it means?

Don’t put the { on the second line.
The Bubble’s verification process is a bit touchy, and as explained in the shown error, want function(properties, context) { on the first line (with spaces and everything ^^)

1 Like

Not only that, but there can be no space after the function keyword. In any event, the error is incorrect, since the code is perfectly valid JS. (This issue has come up a number of times on the forum over the years.)

1 Like

I’m glad to see this reminder! I was banging my head one day not too long back trying to figure out why my perfectly fine code was causing this issue.

Thanks for the alley-oop!

1 Like