Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
rednerd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orus-io
rednerd
Commits
c7bf1f08085e
Commit
c7bf1f08085e
authored
1 month ago
by
Christophe de Vienne
Browse files
Options
Downloads
Patches
Plain Diff
template-varlist: Fix internal error responses
parent
2f2261ad2e7b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restapi/handlers/template-varlist.go
+3
-4
3 additions, 4 deletions
restapi/handlers/template-varlist.go
with
3 additions
and
4 deletions
restapi/handlers/template-varlist.go
+
3
−
4
View file @
c7bf1f08
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
"context"
"context"
"errors"
"errors"
"fmt"
"fmt"
"net/http"
"github.com/Masterminds/squirrel"
"github.com/Masterminds/squirrel"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/runtime/middleware"
...
@@ -85,6 +84,8 @@
...
@@ -85,6 +84,8 @@
// Handle the incoming request.
// Handle the incoming request.
func
(
h
*
TemplateVarlistHandler
)
Handle
(
params
op
.
TemplateVarlistParams
,
principals
*
models
.
Principal
)
middleware
.
Responder
{
func
(
h
*
TemplateVarlistHandler
)
Handle
(
params
op
.
TemplateVarlistParams
,
principals
*
models
.
Principal
)
middleware
.
Responder
{
log
:=
zerolog
.
Ctx
(
params
.
HTTPRequest
.
Context
())
varlist
,
err
:=
h
.
handle
(
varlist
,
err
:=
h
.
handle
(
params
.
HTTPRequest
.
Context
(),
params
.
HTTPRequest
.
Context
(),
params
.
Request
,
params
.
Request
,
...
@@ -100,9 +101,7 @@
...
@@ -100,9 +101,7 @@
return
r
return
r
}
}
return
op
.
return
InternalError
(
err
,
log
,
false
)
NewTemplateVarlistDefault
(
http
.
StatusInternalServerError
)
.
WithPayload
(
models
.
FromError
(
err
))
}
}
return
op
.
NewTemplateVarlistOK
()
.
WithPayload
(
varlist
)
return
op
.
NewTemplateVarlistOK
()
.
WithPayload
(
varlist
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment