actions artifacts: warn instead of error on invalid request
This commit is contained in:
parent
a0d1cfdf7d
commit
e7abda6a0d
|
@ -311,7 +311,7 @@ func (ar artifactRoutes) comfirmUploadArtifact(ctx *ArtifactContext) {
|
||||||
}
|
}
|
||||||
artifactName := ctx.Req.URL.Query().Get("artifactName")
|
artifactName := ctx.Req.URL.Query().Get("artifactName")
|
||||||
if artifactName == "" {
|
if artifactName == "" {
|
||||||
log.Error("Error artifact name is empty")
|
log.Warn("Error artifact name is empty")
|
||||||
ctx.Error(http.StatusBadRequest, "Error artifact name is empty")
|
ctx.Error(http.StatusBadRequest, "Error artifact name is empty")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ func validateArtifactHash(ctx *ArtifactContext, artifactName string) bool {
|
||||||
if paramHash == artifactHash {
|
if paramHash == artifactHash {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
log.Error("Invalid artifact hash: %s", paramHash)
|
log.Warn("Invalid artifact hash: %s", paramHash)
|
||||||
ctx.Error(http.StatusBadRequest, "Invalid artifact hash")
|
ctx.Error(http.StatusBadRequest, "Invalid artifact hash")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,7 +359,7 @@ func (r *artifactV4Routes) finalizeArtifact(ctx *ArtifactContext) {
|
||||||
checksum = req.Hash.Value
|
checksum = req.Hash.Value
|
||||||
}
|
}
|
||||||
if err := mergeChunksForArtifact(ctx, chunks, r.fs, artifact, checksum); err != nil {
|
if err := mergeChunksForArtifact(ctx, chunks, r.fs, artifact, checksum); err != nil {
|
||||||
log.Error("Error merge chunks: %v", err)
|
log.Warn("Error merge chunks: %v", err)
|
||||||
ctx.Error(http.StatusInternalServerError, "Error merge chunks")
|
ctx.Error(http.StatusInternalServerError, "Error merge chunks")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue