@@ -29,6 +29,7 @@ const SLACK_RETRY_DEFAULT_BASE_DELAY_MS = 1000;
2929const SLACK_RETRY_JITTER_MAX_MS = 250 ;
3030const SLACK_RETRY_MAX_DELAY_MS = 60_000 ;
3131const SLACK_RETRY_EXPONENT_CAP = 6 ;
32+ const SLACK_MAX_RETRIES = 5 ;
3233
3334// Tiny async sleep helper
3435const sleep = ( ms : number ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
@@ -555,7 +556,7 @@ export const Slack: ConnectorSpec = {
555556 await slackRequestWithRateLimitRetry < SlackAssistantSearchContextResponse > ( {
556557 ctx,
557558 action : 'searchMessages' ,
558- maxRetries : 5 ,
559+ maxRetries : SLACK_MAX_RETRIES ,
559560 request : ( ) =>
560561 ctx . client . post ( `${ SLACK_API_BASE } /assistant.search.context` , requestBody , {
561562 headers : {
@@ -658,7 +659,7 @@ export const Slack: ConnectorSpec = {
658659 } > ( {
659660 ctx,
660661 action : 'resolveChannelId' ,
661- maxRetries : 5 ,
662+ maxRetries : SLACK_MAX_RETRIES ,
662663 request : ( ) => ctx . client . get ( `${ SLACK_API_BASE } /conversations.list` , { params } ) ,
663664 } ) ;
664665
@@ -745,7 +746,7 @@ export const Slack: ConnectorSpec = {
745746 const response = await slackRequestWithRateLimitRetry ( {
746747 ctx,
747748 action : 'sendMessage' ,
748- maxRetries : 5 ,
749+ maxRetries : SLACK_MAX_RETRIES ,
749750 request : ( ) =>
750751 ctx . client . post ( `${ SLACK_API_BASE } /chat.postMessage` , payload , {
751752 headers : {
0 commit comments