muagqa 1.5.2 → 1.6.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": "muagqa",
3
- "version": "1.5.2",
3
+ "version": "1.6.1",
4
4
  "description": "MuagQA CLI — Test case runner with one-time session token and Playwright recorder",
5
5
  "author": "Mary C.N. Enwezor",
6
6
  "license": "MIT",
@@ -12,7 +12,18 @@ export async function generateTemplateFromDashboard(token) {
12
12
  })
13
13
  });
14
14
 
15
- const data = await response.json();
15
+ let data;
16
+ try {
17
+ data = await response.json();
18
+ } catch (err) {
19
+ const raw = await response.text().catch(() => "");
20
+ console.error("Failed to parse template response.");
21
+ console.error(`Status: ${response.status} ${response.statusText}`);
22
+ if (raw) {
23
+ console.error("Body:", raw);
24
+ }
25
+ process.exit(1);
26
+ }
16
27
 
17
28
  if (!data.success) {
18
29
  console.error("❌ ERROR:", data.error);
@@ -29,4 +40,4 @@ export async function generateTemplateFromDashboard(token) {
29
40
  console.log(output);
30
41
  console.log("==============================");
31
42
  console.log("File saved as: generated-template.spec.js");
32
- }
43
+ }