Error code handling in python

Hello i am getting this error “Exception: {‘code’: 30, ‘message’: 'There are not enough credits to perform the requested operation, which requires 1001 credit”

how do i handle this in python? any sample code to handle this error so that my application doesn’t get aborted and continue running after credit restored ?

This particular error sounds like your initial query was too big to process, even if you had the full 1001 credits. Normally if you were running a smaller query and you ran out of credits, there would be a message included about how much time until you have enough credits to run the query again. You would have to capture that and make your script wait for that many seconds and then try again.

1 Like