Hi All - I’m running into a weird issue with Secre...
# ask-community
r
Hi All - I’m running into a weird issue with Secrets. Sometimes a task will fail with the error message below even though the Secret is stored correctly in the tenant:
Copy code
KeyError('The secret <SECRET NAME> was not found.  Please ensure that it was set correctly in your tenant
This seems to happen the most when I’m using task mapping but it seems pretty random. 100 iterations of the mapped task will work, then the 101st fails with the error above, then the next 100 are successful. Has anyone ran into this issue or have any ideas on what might be happening?
k
Hey @Ryan Brennan, this is because the Secret is an API call and this is an API call failing (maybe rate limiting). It would help if you add the secret to storage ahead of that so that it’s only pulled once.
flow.storage = Storage(…,secrets=[…])
upvote 1
r
Oh awesome! Sorry for the duplicate question, thanks for the quick response @Kevin Kho @Anna Geller
a
don’t be - I only shared because it has 2 more solutions