Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(jira,outlook): replace raw fetch in downloadJiraAttachments, fix …
…Outlook URL encoding

- Jira: replace bare fetch() with fetchWithRetry in downloadJiraAttachments
  for retry logic on transient errors and rate limits
- Outlook: use URLSearchParams in validateConfig $search URL construction
  to match buildInitialUrl and produce RFC 3986 compliant encoding
  • Loading branch information
waleedlatif1 committed Mar 15, 2026
commit c29bc2bea840d6afa7640fe7e83654c635eb23ff
7 changes: 6 additions & 1 deletion apps/sim/connectors/outlook/outlook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,12 @@ export const outlookConnector: ConnectorConfig = {
// If a search query is specified, verify it's valid with a dry run
const searchQuery = sourceConfig.query as string | undefined
if (searchQuery?.trim()) {
const searchUrl = `${GRAPH_API_BASE}/messages?$search="${encodeURIComponent(searchQuery.trim())}"&$top=1&$select=id`
const searchParams = new URLSearchParams({
$search: `"${searchQuery.trim()}"`,
$top: '1',
$select: 'id',
})
const searchUrl = `${GRAPH_API_BASE}/messages?${searchParams.toString()}`
const searchResponse = await fetchWithRetry(
searchUrl,
{
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/tools/jira/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function downloadJiraAttachments(
continue
}
try {
const response = await fetch(att.content, {
const response = await fetchWithRetry(att.content, {
headers: {
Authorization: `Bearer ${accessToken}`,
Accept: '*/*',
Expand Down
Loading