braidfs 0.0.73 → 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -659,6 +659,10 @@ async function proxy_url(url) {
659
659
  subscribe: true,
660
660
  retry: {
661
661
  onRes: (res) => {
662
+ if (res.status !== 209) return console.log(
663
+ `FAILED TO CONNECT TO: ${url}\n` +
664
+ `GOT STATUS CODE: ${res.status}, expected 209.`)
665
+
662
666
  console.log(`connected to ${url}`)
663
667
  console.log(` editable = ${res.headers.get('editable')}`)
664
668
 
@@ -673,7 +677,7 @@ async function proxy_url(url) {
673
677
  },
674
678
  peer
675
679
  }).then(x => {
676
- x.subscribe(async update => {
680
+ if (x.status === 209) x.subscribe(async update => {
677
681
  console.log(`got external update about ${url}`)
678
682
 
679
683
  if (update.body) update.body = update.body_text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braidfs",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "description": "braid technology synchronizing files and webpages",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braidfs",