Skip to content

crds.go returns HTTP 500 on cluster discovery failure instead of 503 making the defined constant dead code #7793

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 63a25ca8-2b76-4c79-9a8a-519a649b2d20

Description

What happened:
In pkg/api/handlers/crds.go:83, a raw c.Status(500) is returned on cluster-discovery failure despite statusServiceUnavailableCRD = 503 being defined at line 63 for exactly this purpose. The nil-client path at line 69 correctly uses the constant. Two different status codes are returned for similar error conditions.

What I expected:
Line 83 should use c.Status(statusServiceUnavailableCRD) consistent with line 69.

Steps to reproduce:

  1. Trigger a cluster discovery failure
  2. Observe HTTP 500 instead of the expected 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