Skip to content
Closed
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements

// Check if local dev server is running.
try {
await axios.get(`http://${localServerUrl}`)
axios.get(`http://${localServerUrl}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing await means any error from axios.get() won’t be caught by the try-catch block. If the dev server is down, the error will be unhandled. Consider attaching a .catch handler or otherwise handling promise rejections.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we're trying to fall back to this.getHtmlContent(webview) if your local server isn't running, but now it won't do that. What happens if your local server isn't running / fails to start? Seems like the webview will be completely broken in that case.

} catch (error) {
vscode.window.showErrorMessage(t("common:errors.hmr_not_running"))

Expand Down