- commit
- edab4d6
- parent
- b5271f2
- author
- Aryan Tiwari
- date
- 2026-03-03 21:57:00 -0500 EST
Chore: Unified Error Logs throughout the repo (#210)
5 files changed,
+8,
-8
+2,
-2
1@@ -467,9 +467,9 @@ func paymentWebhookHandler(apiConfig *router.ApiConfig) http.HandlerFunc {
2 w.Header().Add("content-type", "text/plain")
3
4 if err != nil {
5- logger.Error("error reading request body", "err", err.Error())
6+ logger.Error("ERROR: reading request body", "err", err.Error())
7 w.WriteHeader(http.StatusOK)
8- _, _ = fmt.Fprintf(w, "error reading request body %s", err.Error())
9+ _, _ = fmt.Fprintf(w, "ERROR: reading request body %s", err.Error())
10 return
11 }
12
+2,
-2
1@@ -437,8 +437,8 @@ func (web *WebRouter) ImageRequest(perm func(proj *db.Project) bool) http.Handle
2
3 opts, err := storage.UriToImgProcessOpts(imgOpts)
4 if err != nil {
5- errMsg := fmt.Sprintf("error processing img options: %s", err.Error())
6- web.Cfg.Logger.Error("error processing img options", "err", errMsg)
7+ errMsg := fmt.Sprintf("ERROR: error processing img options: %s", err.Error())
8+ web.Cfg.Logger.Error("ERROR: processing img options", "err", errMsg)
9 http.Error(w, errMsg, http.StatusUnprocessableEntity)
10 return
11 }
+1,
-1
1@@ -192,7 +192,7 @@ func Middleware(handler *CliHandler) pssh.SSHServerMiddleware {
2 user, err := getUser(sesh, dbpool)
3 if err != nil {
4 _, _ = fmt.Fprintf(sesh.Stderr(), "detected ssh command: %s\n", args)
5- s := fmt.Errorf("error: you need to create an account before using the remote cli: %w", err)
6+ s := fmt.Errorf("ERROR: you need to create an account before using the remote cli: %w", err)
7 sesh.Fatal(s)
8 return s
9 }
+2,
-2
1@@ -188,7 +188,7 @@ func Middleware(writeHandler utils.CopyFromClientHandler) pssh.SSHServerMiddlewa
2 defer func() {
3 if r := recover(); r != nil {
4 logger.Error("error running rsync middleware", "err", r)
5- _, _ = session.Stderr().Write([]byte("error running rsync middleware, check the flags you are using\r\n"))
6+ _, _ = session.Stderr().Write([]byte("ERROR: error running rsync middleware, check the flags you are using\r\n"))
7 }
8 }()
9
10@@ -201,7 +201,7 @@ func Middleware(writeHandler utils.CopyFromClientHandler) pssh.SSHServerMiddlewa
11
12 optsCtx, err := rsyncopts.ParseArguments(cmdFlags[1:], true)
13 if err != nil {
14- _, _ = fmt.Fprintf(session.Stderr(), "error parsing rsync arguments: %s\r\n", err.Error())
15+ _, _ = fmt.Fprintf(session.Stderr(), "ERROR: error parsing rsync arguments: %s\r\n", err.Error())
16 return err
17 }
18
+1,
-1
1@@ -183,7 +183,7 @@ func (m *AccessLogsPage) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
2 ah += int(brdSurf.Size.Height)
3
4 if err != nil {
5- txt := text.New(fmt.Sprintf("Error: %s", err.Error()))
6+ txt := text.New(fmt.Sprintf("ERROR: %s", err.Error()))
7 txt.Style = vaxis.Style{Foreground: red}
8 txtSurf, _ := txt.Draw(ctx)
9 root.AddChild(0, ah, txtSurf)