Loading
Give PermissionDenied its own case in handleRouterError switch
What does this MR do?
Extracts codes.PermissionDenied into its own explicit case in the handleRouterError switch in router/client.go.
Previously the default case used code != codes.PermissionDenied inline in the return statement, which was flagged during review of !7299 (merged) as harder to read. This follow-up gives PermissionDenied its own case so the switch reads as a clear enumeration of outcomes:
Unimplemented→ disable router, fall back to RailsisRouterFailure→ breaker failure, maybe fall backPermissionDenied→ runner is unhealthy (403, same as direct HTTP path)default→ transient error, runner stays healthy and keeps polling
No behaviour change.
Why was this MR needed?
Follow-up to !7299 (merged) as requested by @timofurrer in the review thread.
What's the best way to test this MR?
TestRequestJob_RequestErrorHealth covers all cases including PermissionDenied (expects healthy=false) and all other codes (expects healthy=true). All subtests pass.
What are the relevant issue numbers?
Follow-up to !7299 (merged).