braid-http 1.3.38 → 1.3.39

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.
@@ -947,7 +947,7 @@ async function multiplex_fetch(url, params, skip_multiplex_method) {
947
947
  try {
948
948
  var res = await normal_fetch(url, params)
949
949
 
950
- if (res.status === 422 && !(await promise_done(mux_promise))) {
950
+ if (res.status === 424 && !(await promise_done(mux_promise))) {
951
951
  // this error will trigger a retry if the user is using that option
952
952
  throw new Error('multiplexer not yet connected')
953
953
  }
@@ -290,14 +290,14 @@ function braidify (req, res, next) {
290
290
  // if the multiplexer doesn't exist, send an error
291
291
  var m = braidify.multiplexers?.get(multiplexer)
292
292
  if (!m) {
293
- res.writeHead(422, 'Multiplexer no exist', {'Bad-Multiplexer': multiplexer})
293
+ res.writeHead(404, 'Multiplexer no exist', {'Bad-Multiplexer': multiplexer})
294
294
  return res.end(`multiplexer ${multiplexer} does not exist`)
295
295
  }
296
296
 
297
297
  // if the stream doesn't exist, send an error
298
298
  let s = m.streams.get(stream)
299
299
  if (!s) {
300
- res.writeHead(422, 'Stream no exist', {'Bad-Stream': stream})
300
+ res.writeHead(404, 'Stream no exist', {'Bad-Stream': stream})
301
301
  return res.end(`stream ${stream} does not exist`)
302
302
  }
303
303
 
@@ -324,7 +324,7 @@ function braidify (req, res, next) {
324
324
  // find the multiplexer object (contains a response object)
325
325
  var m = braidify.multiplexers?.get(multiplexer)
326
326
  if (!m) {
327
- res.writeHead(422, 'Multiplexer no exist', {'Bad-Multiplexer': multiplexer})
327
+ res.writeHead(424, 'Multiplexer no exist', {'Bad-Multiplexer': multiplexer})
328
328
  return res.end(`multiplexer ${multiplexer} does not exist`)
329
329
  }
330
330
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.38",
3
+ "version": "1.3.39",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"