Skip to content

fix: integration resource listing causing error 5xx#4012

Merged
forestileao merged 6 commits intomainfrom
fix/remaning-500-error
Apr 7, 2026
Merged

fix: integration resource listing causing error 5xx#4012
forestileao merged 6 commits intomainfrom
fix/remaning-500-error

Conversation

@forestileao
Copy link
Copy Markdown
Collaborator

Summary

Change integration resource listing failures caused by integration/provider state into FailedPrecondition instead of a 5xx.

This prevents third-party integration issues from surfacing as internal server errors when calling:

GET /api/v1/organizations/{id}/integrations/{integration_id}/resources

Changes

  • Updated the shared integration resource listing action in pkg/grpc/actions/organizations/list_integration_resources.go
  • When an integration's ListResources(...) call fails, the API now:
    • logs the failure
    • returns codes.FailedPrecondition
    • no longer returns a 5xx

Why

Resource listing depends on external integrations and provider-specific configuration.

If an integration is misconfigured, incomplete, disconnected, or a third-party provider fails, that is not an internal SuperPlane server error. Returning FailedPrecondition makes the failure semantics correct and avoids reporting provider/configuration problems as 500-class errors.

Example case:

  • Discord channel resource listing failed because the integration was missing botToken
  • previously this surfaced as HTTP 500
  • now it is treated as a failed precondition instead

Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8c1927a. Configure here.

@forestileao
Copy link
Copy Markdown
Collaborator Author

👍

@forestileao forestileao merged commit 86191c8 into main Apr 7, 2026
5 checks passed
@forestileao forestileao deleted the fix/remaning-500-error branch April 7, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants