Skip to content

Commit f62c4bd

Browse files
gioeleceratimjh1
andauthored
whep: return failed to connect to peer error in callback (#594)
* whep: return failed to connect to peer error in callback * remove return * test * Revert "test" This reverts commit 98cb53c. --------- Co-authored-by: Max Holland <max@livepeer.org>
1 parent 510cd33 commit f62c4bd

File tree

1 file changed

+1
-1
lines changed
  • packages/core-web/src/webrtc

1 file changed

+1
-1
lines changed

packages/core-web/src/webrtc/whep.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const createNewWHEP = <TElement extends HTMLMediaElement>({
137137

138138
try {
139139
if (peerConnection?.connectionState === "failed") {
140-
throw new Error("Failed to connect to peer.");
140+
callbacks?.onError?.(new Error("Failed to connect to peer."));
141141
}
142142

143143
if (

0 commit comments

Comments
 (0)