@sjcrh/proteinpaint-server 2.69.1-0 → 2.70.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.69.1-0",
3
+ "version": "2.70.1",
4
4
  "type": "module",
5
5
  "description": "a genomics visualization tool for exploring a cohort's genotype and phenotype data",
6
6
  "main": "src/app.js",
package/routes/hicstat.js CHANGED
@@ -44,7 +44,7 @@ function init() {
44
44
  const out = await do_hicstat(file, isurl);
45
45
  res.send({ out });
46
46
  } catch (e) {
47
- res.send({ error: e?.message || e });
47
+ res.send({ error: e instanceof Error ? e.message : e });
48
48
  if (e instanceof Error && e.stack)
49
49
  console.log(e);
50
50
  }
@@ -69,7 +69,7 @@ function init({ genomes }) {
69
69
  throw "invalid termdb object";
70
70
  await trigger_getnumericcategories(q, res, tdb, ds);
71
71
  } catch (e) {
72
- res.send({ error: e?.message || e });
72
+ res.send({ error: e instanceof Error ? e.message : e });
73
73
  if (e instanceof Error && e.stack)
74
74
  console.log(e);
75
75
  }
@@ -68,7 +68,7 @@ function init({ genomes }) {
68
68
  throw "invalid dataset name";
69
69
  await trigger_getpercentile(q, res, ds);
70
70
  } catch (e) {
71
- res.send({ error: e?.message || e });
71
+ res.send({ error: e instanceof Error ? e.message : e });
72
72
  if (e instanceof Error && e.stack)
73
73
  console.log(e);
74
74
  }
@@ -49,7 +49,7 @@ function init({ genomes }) {
49
49
  throw "invalid termdb object";
50
50
  await trigger_rootterm(q, res, tdb);
51
51
  } catch (e) {
52
- res.send({ error: e?.message || e });
52
+ res.send({ error: e instanceof Error ? e.message : e });
53
53
  if (e instanceof Error && e.stack)
54
54
  console.log(e);
55
55
  }
@@ -48,7 +48,7 @@ function init({ genomes }) {
48
48
  throw "invalid termdb object";
49
49
  await trigger_children(q, res, tdb);
50
50
  } catch (e) {
51
- res.send({ error: e?.message || e });
51
+ res.send({ error: e instanceof Error ? e.message : e });
52
52
  if (e instanceof Error && e.stack)
53
53
  console.log(e);
54
54
  }
@@ -32,7 +32,7 @@ function init({ genomes }) {
32
32
  throw "invalid termdb object";
33
33
  await trigger_gettermsbyid(q, res, tdb);
34
34
  } catch (e) {
35
- res.send({ error: e?.message || e });
35
+ res.send({ error: e instanceof Error ? e.message : e });
36
36
  if (e instanceof Error && e.stack)
37
37
  console.log(e);
38
38
  }