Skip to content

Commit 5a7641f

Browse files
committed
fix(coderd/x/chatd/chattool): add list_templates auth error context
Address CRF-26 by adding list_templates operation context to the user-facing asOwner authorization error response.
1 parent dfc293d commit 5a7641f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

coderd/x/chatd/chattool/listtemplates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func ListTemplates(db database.Store, organizationID uuid.UUID, options ListTemp
158158
func(ctx context.Context, args listTemplatesArgs, _ fantasy.ToolCall) (fantasy.ToolResponse, error) {
159159
ctx, err := asOwner(ctx, db, options.OwnerID)
160160
if err != nil {
161-
return fantasy.NewTextErrorResponse(err.Error()), nil
161+
return fantasy.NewTextErrorResponse(xerrors.Errorf("authorize list_templates owner: %w", err).Error()), nil
162162
}
163163

164164
filterParams := database.GetTemplatesWithFilterParams{

0 commit comments

Comments
 (0)