mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
fix (#6236)
This commit is contained in:
parent
b19f69a5c6
commit
4bf257c481
@ -67,8 +67,6 @@ export type CurlEvent =
|
||||
| CurlErrorEvent
|
||||
| CurlCloseEvent;
|
||||
|
||||
export type CurlEventLog = CurlEvent[];
|
||||
|
||||
const CurlConnections = new Map<string, Curl>();
|
||||
const eventLogFileStreams = new Map<string, fs.WriteStream>();
|
||||
const timelineFileStreams = new Map<string, fs.WriteStream>();
|
||||
|
@ -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
|
||||
|
@ -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*]/, '')
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ const RealtimeActiveResponsePane: FC<{ response: WebSocketResponse | Response }>
|
||||
gap: 'var(--padding-sm)',
|
||||
}}
|
||||
>
|
||||
<select onChange={e => setEventType(e.currentTarget.value as CurlEvent['type'])}>
|
||||
<select disabled={protocol === 'curl'} onChange={e => setEventType(e.currentTarget.value as CurlEvent['type'])}>
|
||||
<option value="">All</option>
|
||||
<option value="message">Message</option>
|
||||
<option value="open">Open</option>
|
||||
|
Loading…
Reference in New Issue
Block a user