braid-text 0.2.37 → 0.2.38
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.
- package/package.json +1 -1
- package/simpleton-client.js +2 -1
package/package.json
CHANGED
package/simpleton-client.js
CHANGED
|
@@ -115,7 +115,7 @@ function simpleton_client(url, { apply_remote_update, generate_local_diff_update
|
|
|
115
115
|
|
|
116
116
|
outstanding_changes++
|
|
117
117
|
try {
|
|
118
|
-
await braid_fetch(url, {
|
|
118
|
+
var r = await braid_fetch(url, {
|
|
119
119
|
headers: { "Merge-Type": "simpleton",
|
|
120
120
|
...(content_type ? {"Content-Type": content_type} : {}) },
|
|
121
121
|
method: "PUT",
|
|
@@ -123,6 +123,7 @@ function simpleton_client(url, { apply_remote_update, generate_local_diff_update
|
|
|
123
123
|
version, parents, patches,
|
|
124
124
|
peer
|
|
125
125
|
})
|
|
126
|
+
if (!r.ok) throw new Error(`bad http status: ${r.status}${(r.status === 401 || r.status === 403) ? ` (access denied)` : ''}`)
|
|
126
127
|
} catch (e) {
|
|
127
128
|
on_error(e)
|
|
128
129
|
throw e
|