Skip to content

fix(coderd): handle rbac.NotAuthorizedError when deleting template#21645

Merged
johnstcn merged 1 commit into
mainfrom
cj/fix-delete-template-500
Jan 23, 2026
Merged

fix(coderd): handle rbac.NotAuthorizedError when deleting template#21645
johnstcn merged 1 commit into
mainfrom
cj/fix-delete-template-500

Conversation

@johnstcn
Copy link
Copy Markdown
Member

@johnstcn johnstcn commented Jan 23, 2026

Relates to https://github.com/coder/aibridge/pull/143/changes#r2720659638

We previously had been returning the following when attempting to delete failed due to lack of permissions.

500 Internal error deleting template: unauthorized: rbac: forbidden

This PR updates the handler to return our usual 403 forbidden response.

@johnstcn johnstcn self-assigned this Jan 23, 2026
@johnstcn johnstcn changed the title fix(coderd): properly handle no permission when deleting template fix(coderd): handle rbac.NotAuthorizedError when deleting template Jan 23, 2026
@johnstcn johnstcn marked this pull request as ready for review January 23, 2026 11:41
Copy link
Copy Markdown
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Thanks!

@johnstcn johnstcn merged commit fa7baeb into main Jan 23, 2026
36 checks passed
@johnstcn johnstcn deleted the cj/fix-delete-template-500 branch January 23, 2026 12:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants