Skip to content

Get previous template version #5230

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

Merged
merged 17 commits into from
Dec 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update coderd/templateversions.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
  • Loading branch information
BrunoQuaresma and mafredri authored Dec 5, 2022
commit d218d3270e2111ca2c49fd6e7f58f5628597abbe
2 changes: 1 addition & 1 deletion coderd/templateversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ func (api *API) previousTemplateVersionByOrganizationAndName(rw http.ResponseWri
OrganizationID: organization.ID,
Name: templateVersionName,
})
if errors.Is(err, sql.ErrNoRows) {
if xerrors.Is(err, sql.ErrNoRows) {
httpapi.Write(ctx, rw, http.StatusNotFound, codersdk.Response{
Message: fmt.Sprintf("No template version found by name %q.", templateVersionName),
})
Expand Down