diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 40e16363170..34950f1211f 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -393,7 +393,7 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam // Fixes https://github.com/ipfs/go-ipfs/issues/7252 mimeType, err := mimetype.DetectReader(content) if err != nil { - http.Error(w, "cannot detect content-type", http.StatusInternalServerError) + http.Error(w, fmt.Sprintf("cannot detect content-type: %s", err.Error()), http.StatusInternalServerError) return }