Permalink
Browse files

api update for error types

  • Loading branch information...
1 parent 35dcd09 commit 5d78e6d6d54efde725d46c0b1e867f6c9cd725b1 @michelle michelle committed Mar 31, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/api.md
View
@@ -86,8 +86,7 @@ This event does not need to fire before creating or receiving connections.
`function (error) { }`
-Emitted when an unexpected event occurs. Errors on the Peer are **always
-fatal**. Errors from the underlying socket and PeerConnections are forwarded here.
+Emitted when an unexpected event occurs. All errors on the Peer except `server-disconnected` and `incompatible-peer` are **fatal**. Errors from the underlying socket and PeerConnections are forwarded here.
The `error` object also has a `type` parameter that may be helpful in responding to client errors properly:
* `browser-incompatible`: The client's browser does not support some or all WebRTC features that you are trying to use.
@@ -100,6 +99,7 @@ The `error` object also has a `type` parameter that may be helpful in responding
* `socket-closed`: The underlying socket closed unexpectedly.
* (The Peer object is destroyed after one of the errors above are emitted.)
* `server-disconnected`: A Peer that has been disconnected is being used to try to connect.
+* `incompatible-peer`: The peer that is trying to connect or that you are trying to connect to is using a browser that is different from yours. **Currently DataChannels are not interoperable between Chrome and Firefox.**
### Event: 'close'

0 comments on commit 5d78e6d

Please sign in to comment.