Make 502 retry

pull/1573/head
Ryan Tharp 4 years ago committed by GitHub
parent fec477d3d3
commit 6a1d0e93a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -238,6 +238,13 @@ const processOnionResponse = async (
// FIXME: 401/500 handling?
// detect SNode is deregisted?
if (response.status === 502) {
log.warn(`(${reqIdx}) [path] Got 502: snode not found`);
return RequestError.BAD_PATH;
}
// detect SNode is not ready (not in swarm; not done syncing)
if (response.status === 503) {
log.warn(`(${reqIdx}) [path] Got 503: snode not ready`);

Loading…
Cancel
Save