File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed
packages/backend-function/src/lambda-shims Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @aws-amplify/backend-function ' : patch
3+ ---
4+
5+ catch errors during secret refreshes
Original file line number Diff line number Diff line change 1+ {
2+ "rules" : {
3+ "no-console" : " off"
4+ }
5+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,19 @@ await internalAmplifyFunctionResolveSsmParams();
88
99const SSM_PARAMETER_REFRESH_MS = 1000 * 60 ;
1010
11- setInterval ( ( ) => {
12- void internalAmplifyFunctionResolveSsmParams ( ) ;
13- } , SSM_PARAMETER_REFRESH_MS ) ;
11+ setInterval (
12+ void ( async ( ) => {
13+ try {
14+ await internalAmplifyFunctionResolveSsmParams ( ) ;
15+ } catch ( error ) {
16+ try {
17+ // Attempt to log error
18+ console . debug ( error ) ;
19+ // eslint-disable-next-line amplify-backend-rules/no-empty-catch
20+ } catch ( error ) {
21+ // Do nothing if logging fails
22+ }
23+ }
24+ } ) ,
25+ SSM_PARAMETER_REFRESH_MS
26+ ) ;
You can’t perform that action at this time.
0 commit comments