Fix 'InvalidManifestErr' to have a response.body

Signed-off-by: Bogdan BIVOLARU <104334+bogdanbiv@users.noreply.github.com>
This commit is contained in:
Bogdan BIVOLARU
2022-06-28 13:38:00 +03:00
committed by Andrei Aaron
parent 49fb609f28
commit f92e584301
+3 -1
View File
@@ -438,7 +438,9 @@ func (rh *RouteHandler) UpdateManifest(response http.ResponseWriter, request *ht
mediaType := request.Header.Get("Content-Type")
if !storage.IsSupportedMediaType(mediaType) {
response.WriteHeader(http.StatusUnsupportedMediaType)
// response.WriteHeader(http.StatusUnsupportedMediaType)
WriteJSON(response, http.StatusUnsupportedMediaType,
NewErrorList(NewError(MANIFEST_INVALID, map[string]string{"mediaType": mediaType})))
return
}