Skip to content

Fix duplicate user key and log missing slug in raw pastes handler - #228

Open
oxume wants to merge 2 commits into
picosh:mainfrom
oxume:main
Open

oxume wants to merge 2 commits into
picosh:mainfrom
oxume:main

Conversation

@oxume

@oxume oxume commented Oct 14, 2026

Copy link
Copy Markdown

This cleans up the current logs when a paste is not found:

{"time":"2026-10-14T22:14:44.745002864Z","level":"INFO","source":{"function":"github.com/picosh/pico/pkg/apps/pastes.(*webRouter).postHandlerRaw","file":"/app/pkg/apps/pastes/api.go","line":273},"msg":"paste not found","service":"pastes-web","hostname":"<hostname>","nodename":"<nodename>","user":"<username>","userId":"<user_id>"}
{"time":"2026-10-14T22:14:49.449045643Z","level":"INFO","source":{"function":"github.com/picosh/pico/pkg/apps/pastes.(*webRouter).postHandler","file":"/app/pkg/apps/pastes/api.go","line":221},"msg":"paste not found","service":"pastes-web","hostname":"<hostname>","nodename":"<nodename>","slug":"<missing>","user":"<username>","user":"<username>","userId":"<user_id>"}

The current logs don't show the requested slug when raw is requested, and inserts the user twice, as shown above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant