puppyproxy 1.1.7 → 1.1.8
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
|
@@ -57,6 +57,9 @@ export class ProxyRequest {
|
|
|
57
57
|
return response;
|
|
58
58
|
} else {
|
|
59
59
|
this.failure();
|
|
60
|
+
if (this.options.rejectedCodes && this.options.rejectedCodes.includes(response.status)) {
|
|
61
|
+
throw new Error(`exit`);
|
|
62
|
+
}
|
|
60
63
|
throw new Error(`Failed to fetch ${url} status ${response.status}`);
|
|
61
64
|
}
|
|
62
65
|
} catch (error) {
|
|
@@ -74,6 +77,10 @@ export class ProxyRequest {
|
|
|
74
77
|
if (attempt === retries - 1) {
|
|
75
78
|
throw error;
|
|
76
79
|
}
|
|
80
|
+
if (error.message === "exit") {
|
|
81
|
+
this.client.config.LOG?.error && log.error(id, `Exiting retries for ${url} due to exit signal`);
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
}
|