Sign In Register

How can we help you today?

Start a new topic

SparkTeam.drop() doesn't work

When I call SparkTeam.drop() from event code that I run using Test Harness, I get an error with only line number and no text or any information.

I suspect that the reason is that the user I am authenticated with is not a team owner, but that is not specified in the documentation and doesn't fit the logic of the cloud code at all (cloud code api should not check the user authorization, requests/events that call that api should).

Please, see the screenshot attached.

1 Comment

Hi Leonid,

Apologies for the delayed response. Dropping a team with a DropTeamRequest as someone who is not the owner will give you the "team": "NOT_ONWER" error. Dropping a team in Cloud Code as someone who is not the owner will work fine, I've tested this and can confirm so. I've noticed that you're nullifying team just before dropping it, this may be causing the issue. You could try replacing to contents of that function with "return" or removing " = null;" from the current function.



Login to post a comment