Przeglądaj źródła

Make permission error clear

Michelle Bu 11 lat temu
rodzic
commit
d53d870e67
3 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 1 1
      lib/peer.js

+ 1 - 1
dist/peer.js

@@ -1798,7 +1798,7 @@ Peer.prototype.listAllPeers = function(cb) {
         helpfulError = 'You need to enable `allow_discovery` on your self-hosted'
           + ' PeerServer to use this feature.';
       }
-      self._abort('permissions-error', 'It doesn\'t look like you have permission to list peers IDs.');
+      throw new Error('It doesn\'t look like you have permission to list peers IDs. ' + helpfulError);
       cb([]);
       return;
     } else if (http.status !== 200) {

Plik diff jest za duży
+ 0 - 0
dist/peer.min.js


+ 1 - 1
lib/peer.js

@@ -430,7 +430,7 @@ Peer.prototype.listAllPeers = function(cb) {
         helpfulError = 'You need to enable `allow_discovery` on your self-hosted'
           + ' PeerServer to use this feature.';
       }
-      self._abort('permissions-error', 'It doesn\'t look like you have permission to list peers IDs.');
+      throw new Error('It doesn\'t look like you have permission to list peers IDs. ' + helpfulError);
       cb([]);
       return;
     } else if (http.status !== 200) {

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików