- Notifications
You must be signed in to change notification settings - Fork928
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 ourterms of service andprivacy 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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alwaysmeticulousbot commentedJul 30, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ 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. |
Uh oh!
There was an error while loading.Please reload this page.
ifhttpapi.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 ahttp.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
to005dcd3
Compare708557d
intopost-workspace-by-userUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Do not use deprecated endpoints in tests. Maybe we should keep a legacy test or two?