#7252 - print error message
Gowtham G committed
May 1, 2020 at 22:37 UTC
214d29ebf8859ff0550c9b0f2fd21958d67b370a
1 file changed
+1
-1
core/corehttp/gateway_handler.go
+1
-1
@@ -381,7 +381,7 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam
381
// Fixes https://github.com/ipfs/go-ipfs/issues/7252
382
mimeType, err := mimetype.DetectReader(content)
383
if err != nil {
384
- http.Error(w, "cannot detect content-type", http.StatusInternalServerError)
384
+ http.Error(w, fmt.Sprintf("cannot detect content-type: %s", err.Error()), http.StatusInternalServerError)
385
return
386
}
387