Skip to content

admission_webhooks.go returns HTTP 500 on cluster discovery failure instead of the defined 503 constant #7794

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 97afc71b-2f9c-47c0-953b-a911a4a1b836

Description

What happened:
In pkg/api/handlers/admission_webhooks.go:80, c.Status(500) is returned on cluster-discovery failure despite statusServiceUnavailableWebhook = 503 being defined at line 60. The nil-client path at line 66 correctly uses the constant.

What I expected:
Line 80 should use c.Status(statusServiceUnavailableWebhook) consistent with line 66.

Steps to reproduce:

  1. Trigger a cluster discovery failure in the admission webhooks handler
  2. Observe HTTP 500 instead of 503

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions