Skip to content
Snippets Groups Projects
Commit c76f6277 authored by Dean's avatar Dean
Browse files

custom status for errors in /upload/simple

parent 8b151069
No related branches found
No related tags found
No related merge requests found
...@@ -357,7 +357,11 @@ func UploadPomf(associateObjectsWithUser bool, simpleResponse bool) func(http.Re ...@@ -357,7 +357,11 @@ func UploadPomf(associateObjectsWithUser bool, simpleResponse bool) func(http.Re
if fResponse.Success { if fResponse.Success {
w.Write([]byte(fmt.Sprintf("%s,200\n", fResponse.URL))) w.Write([]byte(fmt.Sprintf("%s,200\n", fResponse.URL)))
} else { } else {
w.Write([]byte(",500\n")) status := fResponse.StatusCode
if status == 0 {
status = 500
}
w.Write([]byte(fmt.Sprintf(",%v\n", status)))
} }
} }
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment