511 Network Authentication Required (RFC 6585)
The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).[59]
so i think if occur the authenticate error, we dont't need retry
about 511, wiki description:
5xxerror
so i think if occur the authenticate error, we dont't need retry
btw,the 511 is biggest error code in 5xx
so I think
error.response.status >= 500 && error.response.status <= 510
is better