Changeset 24 in code


Ignore:
Timestamp:
Oct 19, 2021, 6:38:15 AM (4 years ago)
Author:
dev
Message:

Hide true error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/partage.go

    r23 r24  
    106106        t, err := template.ParseFiles(conf.templatedir + "/" + f)
    107107        if err != nil {
    108                 http.Error(w, err, http.StatusInternalServerError)
     108                http.Error(w, "Internal error", http.StatusInternalServerError)
    109109                return
    110110        }
     
    131131
    132132        if err = writefile(f, r.Body, r.ContentLength); err != nil {
    133                 http.Error(w, err, http.StatusInternalServerError)
     133                http.Error(w, "Internal error", http.StatusInternalServerError)
    134134                defer os.Remove(tmp.Name())
    135135                return
     
    154154                post, err := h.Open()
    155155                if err != nil {
    156                         http.Error(w, err, http.StatusInternalServerError)
     156                        http.Error(w, "Internal error", http.StatusInternalServerError)
    157157                        return
    158158                }
     
    162162                f, err := os.Create(tmp.Name())
    163163                if err != nil {
    164                         http.Error(w, err, http.StatusInternalServerError)
     164                        http.Error(w, "Internal error", http.StatusInternalServerError)
    165165                        return
    166166                }
     
    168168
    169169                if err = writefile(f, post, h.Size); err != nil {
    170                         http.Error(w, err, http.StatusInternalServerError)
     170                        http.Error(w, "Internal error", http.StatusInternalServerError)
    171171                        defer os.Remove(tmp.Name())
    172172                        return
Note: See TracChangeset for help on using the changeset viewer.