Skip to content

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Aug 29, 2025

Coder Tasks requires us to create a workspace, but we want to be able to return a codersdk.Task instead of a codersdk.Workspace. This requires untangling createWorkspace from directly writing to http.ResponseWriter.

@DanielleMaywood DanielleMaywood marked this pull request as ready for review August 29, 2025 12:18
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

LGTM, one non-blocking suggestion that could be deferred

}

type responseError struct {
status int
Copy link
Member

Choose a reason for hiding this comment

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

How about embedding or extending codersdk.Error instead? It already has these fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unsure about that for now, codersdk.Error also contains a few extra fields such as method url and Helper which I'm not sure make such sense given the context

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough 👍

@DanielleMaywood DanielleMaywood merged commit 29a7313 into main Aug 29, 2025
52 of 55 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/refactor/create-workspace branch August 29, 2025 13:17
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2025
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.

3 participants