Commit 21ee94f
committed
fix: prevent JSONResponse._beforeSuite from hanging recorder
JSONResponse._beforeSuite() was throwing errors synchronously when the
request helper wasn't found or properly configured. When running with
codeceptjs run/run-workers, this caused 'trapped unhandled rejection'
and the process would hang.
Changed to:
- Catch all errors and log warnings instead of throwing
- Early return if request helper is not available
- Ensure config object exists before setting callbacks
- Prevents recorder from hanging on rejected promises
This allows tests to proceed even if JSONResponse isn't properly configured,
with clear warning messages instead of silent hangs.1 parent cb7ba57 commit 21ee94f
1 file changed
+27
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
79 | 99 | | |
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
85 | 105 | | |
86 | | - | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
0 commit comments