Skip to content

Commit d84b7e8

Browse files
committed
fix(docusign): validate document file is present before sending envelope
1 parent 8c68804 commit d84b7e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/sim/app/api/tools/docusign/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ async function handleSendEnvelope(
196196
documentId: '1',
197197
},
198198
]
199+
} else if (((status as string) || 'sent') === 'sent') {
200+
return NextResponse.json(
201+
{ success: false, error: 'A document file is required to send an envelope' },
202+
{ status: 400 }
203+
)
199204
}
200205

201206
const response = await fetch(`${apiBase}/envelopes`, {

0 commit comments

Comments
 (0)