Add HTMX co-owner invitation management endpoints - #100
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| def _render_pending_team_column( | ||
| request: Request, | ||
| brand_slug: str, | ||
| *, | ||
| feedback_message: str | None = None, | ||
| feedback_type: str = "info", | ||
| form_state: Dict[str, str] | None = None, | ||
| status_code: int = status.HTTP_200_OK, | ||
| ) -> HTMLResponse: | ||
| templates = request.app.state.templates | ||
| context = brand_service.get_team_partial_context(brand_slug) | ||
| context.update( |
There was a problem hiding this comment.
Handle missing brand when rendering pending-team partial
The helper used by the invite/approve/cancel endpoints calls brand_service.get_team_partial_context(brand_slug) without guarding against BrandNotFound. Those routes catch BrandError and try to render this partial even when the slug is invalid, so a POST like /brands/unknown/co-owners results in an uncaught BrandNotFound and a 500 response instead of a 404 or a friendly error partial. Please return a proper error when the brand is missing before attempting to re-render the partial.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e19fb0333083279b19e4cf1d4799cf