Skip to content

Commit

Permalink
Improve user facing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Aug 27, 2024
1 parent 41fc3a7 commit 17bdd97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/internal/handlers/template_request_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (a *APIStore) TemplateRequestBuild(c *gin.Context, templateID api.TemplateI
// Check if the user has access to the template
_, err = a.db.Client.Env.Query().Where(env.ID(templateID), env.TeamID(team.ID)).Only(ctx)
if err != nil {
a.sendAPIStoreError(c, http.StatusNotFound, fmt.Sprintf("Error when getting env: %s", err))
a.sendAPIStoreError(c, http.StatusNotFound, fmt.Sprintf("Error when getting template: %s", err))

err = fmt.Errorf("error when getting env: %w", err)
telemetry.ReportCriticalError(ctx, err)
Expand Down

0 comments on commit 17bdd97

Please sign in to comment.