Skip to content

Commit e578a7c

Browse files
authored
Support non-ASCII characters in REST Debug query params (#1081)
1 parent ee49f47 commit e578a7c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/commands/restDebugPanel.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,20 @@ export class RESTDebugPanel {
430430
});
431431

432432
// Send the request
433-
fetch(encodeURI(`${serverInfo}${message.webApp}${path}?${urlParams.toString()}`), {
433+
fetch(`${encodeURI(`${serverInfo}${message.webApp}${path}`)}?${urlParams.toString()}`, {
434434
method: message.method,
435435
agent,
436436
body: hasBody ? message.bodyContent : undefined,
437437
headers,
438+
}).catch((error) => {
439+
outputChannel.appendLine(
440+
typeof error == "string" ? error : error instanceof Error ? error.message : JSON.stringify(error)
441+
);
442+
vscode.window.showErrorMessage(
443+
"Failed to send debuggee REST request. Check 'ObjectScript' Output channel for details.",
444+
"Dismiss"
445+
);
446+
vscode.debug.stopDebugging(vscode.debug.activeDebugSession);
438447
});
439448

440449
// Wait 500ms to allow the server to associate this request with the CSDPDEBUG id

0 commit comments

Comments
 (0)