Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
3ae6117c
Commit
3ae6117c
authored
Oct 22, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server/http: Don't cast res.Error() to an Error (fixes panix on response errors)
parent
73353824
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
server/http/http.go
server/http/http.go
+1
-3
No files found.
server/http/http.go
View file @
3ae6117c
...
@@ -104,9 +104,7 @@ func (i *apiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
...
@@ -104,9 +104,7 @@ func (i *apiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
res
:=
commands
.
Root
.
Call
(
req
)
res
:=
commands
.
Root
.
Call
(
req
)
// if response contains an error, write an HTTP error status code
// if response contains an error, write an HTTP error status code
if
err
=
res
.
Error
();
err
!=
nil
{
if
e
:=
res
.
Error
();
e
!=
nil
{
e
:=
err
.
(
cmds
.
Error
)
if
e
.
Code
==
cmds
.
ErrClient
{
if
e
.
Code
==
cmds
.
ErrClient
{
w
.
WriteHeader
(
http
.
StatusBadRequest
)
w
.
WriteHeader
(
http
.
StatusBadRequest
)
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment