@testomatio/reporter 2.6.2 → 2.6.3
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/lib/pipe/testomatio.js +4 -10
- package/package.json +1 -1
- package/src/pipe/testomatio.js +4 -10
package/lib/pipe/testomatio.js
CHANGED
|
@@ -80,16 +80,10 @@ class TestomatioPipe {
|
|
|
80
80
|
shouldRetry: error => {
|
|
81
81
|
if (!error.response)
|
|
82
82
|
return false;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
case 500: // Internal server error
|
|
88
|
-
return false;
|
|
89
|
-
default:
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
return error.response?.status >= 401; // Retry on 401+ and 5xx
|
|
83
|
+
// no need to retry on 4xx errors, because they caused by user mistake, thus retrying will not help
|
|
84
|
+
// 500 could also be related to both user or server mistake, but decided not to retry for now
|
|
85
|
+
// this code code be changed to retry 500 too if needed
|
|
86
|
+
return error.response?.status >= 501; // Retry only on server errors
|
|
93
87
|
},
|
|
94
88
|
},
|
|
95
89
|
});
|
package/package.json
CHANGED
package/src/pipe/testomatio.js
CHANGED
|
@@ -87,16 +87,10 @@ class TestomatioPipe {
|
|
|
87
87
|
httpMethodsToRetry: ['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE', 'POST'],
|
|
88
88
|
shouldRetry: error => {
|
|
89
89
|
if (!error.response) return false;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
case 500: // Internal server error
|
|
95
|
-
return false;
|
|
96
|
-
default:
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
return error.response?.status >= 401; // Retry on 401+ and 5xx
|
|
90
|
+
// no need to retry on 4xx errors, because they caused by user mistake, thus retrying will not help
|
|
91
|
+
// 500 could also be related to both user or server mistake, but decided not to retry for now
|
|
92
|
+
// this code code be changed to retry 500 too if needed
|
|
93
|
+
return error.response?.status >= 501; // Retry only on server errors
|
|
100
94
|
},
|
|
101
95
|
},
|
|
102
96
|
});
|