Skip to content

Conversation

@dobrac
Copy link
Contributor

@dobrac dobrac commented Oct 7, 2025

Fix build status error check condition


Note

Fixes not-found error detection in template build status handler, removes unused DB error types, and adds an integration test for 400 on invalid ids.

  • API (template build status):
    • Use errors.As with templatecache.TemplateBuildInfoNotFoundError for not-found detection in packages/api/internal/handlers/template_build_status.go.
    • Import internal/cache/templates and drop reliance on shared/pkg/db for this check.
  • DB Errors:
    • Remove unused SnapshotNotFoundError and BuildNotFoundError from packages/shared/pkg/db/errors.go.
  • Tests:
    • Add integration test tests/integration/internal/tests/api/templates/status_build_test.go asserting 400 Bad Request for invalid template/build IDs.

Written by Cursor Bugbot for commit f8c0ef1. This will update automatically on new commits. Configure here.

@dobrac dobrac added the bug Something isn't working label Oct 7, 2025
@dobrac dobrac marked this pull request as ready for review October 7, 2025 21:01
ValentaTomas
ValentaTomas previously approved these changes Oct 7, 2025
@djeebus
Copy link
Contributor

djeebus commented Oct 7, 2025

Can we get a test for this?

@dobrac
Copy link
Contributor Author

dobrac commented Oct 7, 2025

Actually, the issue is different 🤦

@dobrac dobrac marked this pull request as draft October 7, 2025 21:09
@dobrac dobrac marked this pull request as ready for review October 7, 2025 21:29
@dobrac dobrac requested a review from ValentaTomas October 7, 2025 21:29
@dobrac dobrac dismissed ValentaTomas’s stale review October 7, 2025 21:29

the initial was fix incorrect, should be fixed now

@jakubno jakubno self-assigned this Oct 8, 2025
@dobrac dobrac merged commit 21baf68 into main Oct 8, 2025
26 checks passed
@dobrac dobrac deleted the fix-error-check-condition branch October 8, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants