@suffolklitlab/alkiln 4.11.0 → 4.11.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/CHANGELOG.md CHANGED
@@ -40,6 +40,11 @@ Format:
40
40
  -->
41
41
  <!-- ## [Unreleased] -->
42
42
 
43
+
44
+ ## [4.11.1] - 2023-03-21
45
+ ### Changed
46
+ - Get error data from server errors
47
+
43
48
  ## [4.11.0] - 2023-03-13
44
49
  ### Changed
45
50
  - Shorten Axios errors to make them more readable (https://github.com/SuffolkLITLab/ALKiln/pull/632)
@@ -27,7 +27,7 @@ da.get_dev_id = async function ( timeout ) {
27
27
  try {
28
28
  return await axios.request( options );
29
29
  } catch (error) {
30
- throw error.toJSON();
30
+ throw {...error.toJSON(), data: error.response?.data};
31
31
  }
32
32
  }; // Ends da.get_dev_id()
33
33
 
@@ -48,7 +48,7 @@ da.create_project = async function ( project_name, timeout ) {
48
48
  try {
49
49
  return await axios.request( options );
50
50
  } catch (error) {
51
- throw error.toJSON();
51
+ throw {...error.toJSON(), data: error.response?.data};
52
52
  }
53
53
  }; // Ends da.create_project()
54
54
 
@@ -71,7 +71,7 @@ da.pull = async function ( timeout ) {
71
71
  try {
72
72
  return await axios.request( options );
73
73
  } catch (error) {
74
- throw error.toJSON();
74
+ throw {...error.toJSON(), data: error.response?.data};
75
75
  }
76
76
  }; // Ends da.pull()
77
77
 
@@ -92,7 +92,7 @@ da.has_task_finished = async function ( task_id, timeout ) {
92
92
  try {
93
93
  return await axios.request( options );
94
94
  } catch (error) {
95
- throw error.toJSON();
95
+ throw {...error.toJSON(), data: error.response?.data};
96
96
  }
97
97
  }; // Ends da.has_task_finished()
98
98
 
@@ -113,7 +113,7 @@ da.delete_project = async function ( timeout ) {
113
113
  try {
114
114
  return await axios.request( options );
115
115
  } catch (error) {
116
- throw error.toJSON();
116
+ throw {...error.toJSON(), data: error.response?.data};
117
117
  }
118
118
  }; // Ends da.delete_project()
119
119
 
@@ -142,7 +142,7 @@ da.__delete_projects_starting_with = async function ( base_name, starting_num=1,
142
142
 
143
143
  await axios.request( options );
144
144
  } catch ( error ) {
145
- console.log( error.toJSON() )
145
+ console.log( {...error.toJSON(), data: error.response?.data});
146
146
  }
147
147
  name_incrementor++;
148
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {