diff --git a/packages/insomnia/src/main/network/curl.ts b/packages/insomnia/src/main/network/curl.ts index 0b7754afc..38db7ce1b 100644 --- a/packages/insomnia/src/main/network/curl.ts +++ b/packages/insomnia/src/main/network/curl.ts @@ -67,8 +67,6 @@ export type CurlEvent = | CurlErrorEvent | CurlCloseEvent; -export type CurlEventLog = CurlEvent[]; - const CurlConnections = new Map(); const eventLogFileStreams = new Map(); const timelineFileStreams = new Map(); diff --git a/packages/insomnia/src/templating/base-extension.ts b/packages/insomnia/src/templating/base-extension.ts index 0b49f1601..408fbe649 100644 --- a/packages/insomnia/src/templating/base-extension.ts +++ b/packages/insomnia/src/templating/base-extension.ts @@ -156,6 +156,7 @@ export default class BaseExtension { return; } + // FIX THIS: this is throwing unhandled exceptions // If the result is a promise, resolve it async if (result instanceof Promise) { result diff --git a/packages/insomnia/src/templating/index.ts b/packages/insomnia/src/templating/index.ts index a90112a0e..96896f4ae 100644 --- a/packages/insomnia/src/templating/index.ts +++ b/packages/insomnia/src/templating/index.ts @@ -72,6 +72,7 @@ export function render( nj?.renderString(text, templatingContext, (err: Error | null, result: any) => { clearTimeout(id); if (err) { + console.log('Error rendering template', err); const sanitizedMsg = err.message .replace(/\(unknown path\)\s/, '') .replace(/\[Line \d+, Column \d*]/, '') diff --git a/packages/insomnia/src/ui/components/websockets/event-log-view.tsx b/packages/insomnia/src/ui/components/websockets/event-log-view.tsx index 24bb4aa8d..33a0b75de 100644 --- a/packages/insomnia/src/ui/components/websockets/event-log-view.tsx +++ b/packages/insomnia/src/ui/components/websockets/event-log-view.tsx @@ -14,7 +14,7 @@ const Timestamp: FC<{ time: Date | number }> = ({ time }) => { }; interface Props { - events: WebSocketEvent[] | CurlEvent[]; + events: (WebSocketEvent | CurlEvent)[]; selectionId?: string; onSelect: (event: WebSocketEvent | CurlEvent) => void; } diff --git a/packages/insomnia/src/ui/components/websockets/realtime-response-pane.tsx b/packages/insomnia/src/ui/components/websockets/realtime-response-pane.tsx index 337e8335a..78b1dc0d6 100644 --- a/packages/insomnia/src/ui/components/websockets/realtime-response-pane.tsx +++ b/packages/insomnia/src/ui/components/websockets/realtime-response-pane.tsx @@ -192,7 +192,7 @@ const RealtimeActiveResponsePane: FC<{ response: WebSocketResponse | Response }> gap: 'var(--padding-sm)', }} > - setEventType(e.currentTarget.value as CurlEvent['type'])}>