Skip to main content
{
errors: [
'Complexity budget exhausted, query cost 100001 budget remaining 99951 out of 5000000 reset in 50 seconds'
],
error_code: 'ComplexityException',
status_code: 429,
account_id: 20288401
}

When this occurs is it best to just return a 400 failed message for the integration, since the shortLivedToken only lasts 30 seconds?

shortLivedTokens now last 5 minutes. It had been changed.


That said, you can return a 429 and it will retry automatically in a minute from initial send. You can start your action out with a query for available capacity and know how much you’re going to use and proceed if there is enough or cancel if there is not.


You could also write code on your side to track this in memory so multiple requests subtract on your side their predicted amount, tally up used as they run, and then adjust in memory when complete.


You can also queue it for completion later, but that will mean you must return “success” for the action even though it may fail in the future.


What’s the proper return response to send if the user’s gone over say their subscription’s op_count? 500?


402 is a possible option, and then use the error handling Error handling to supply a message to that effect.


Also if you hadn’t seen: App subscription operations exists now, but it doesn’t stop events from sending, nor can you manually reset it yet. Nor does it have a built in UI for the user. So at this point its just as easy to track it within my code using whatever DB I want.


Reply