-
Notifications
You must be signed in to change notification settings - Fork 887
chore: always use new codepath over deprecated #14050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: always use new codepath over deprecated #14050
Conversation
✅ Meticulous spotted zero visual differences across 1072 screens tested: view results. Expected differences? Click here. Last updated for commit ca28cea. This comment will update as new commits are pushed. |
if httpapi.Is404Error(err) { | ||
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should actually send a http.StatusNotFound
for this then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it the request is trying to create a workspace, I am not sure if a 404 makes much sense to the caller? The error indicates why the request failed, being the template does not exist.
func (c *Client) CreateWorkspace(ctx context.Context, _ uuid.UUID, user string, request CreateWorkspaceRequest) (Workspace, error) { | ||
return c.CreateUserWorkspace(ctx, user, request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice approach!
a583cd5
to
005dcd3
Compare
Do not use deprecated endpoints in tests. Maybe we should keep a legacy test or two?