secrets: detect errors and retry every time until fixed