payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
23.39k stars 1.49k forks source link

Error log is polluted with interface messages #7693

Open yobottehg opened 1 month ago

yobottehg commented 1 month ago

Link to reproduction

No response

Payload Version

3.0.0-beta.68

Node Version

20 LTS latest

Next.js Version

15.0.0-canary.57

Describe the Bug

After running 3.0 on prod for some days I checked the container logs to reproduce some issues authors reported. This is very hard as the logs are full of interface messages which are not application errors like:

  1. [13:28:24] ERROR: u: The email or password provided is incorrect.
  2. [13:16:15] ERROR: l: The following field is invalid: alt
  3. [14:08:19] ERROR: l: The following field is invalid: content.4.video

IMHO this should only be notices / info in the logs but not application errors.

Reproduction Steps

Check error logs in the container after trying to save an invalid field collection entry.

Adapters and Plugins

db-postgres

yobottehg commented 1 month ago

Updated to Beta 78 and Next.js 104 today and this is still the same.

denolfe commented 4 weeks ago

This is because the way errors are passed to the front end are via error messages. I wouldn't necessarily consider this an issue. We could look into possibly adding a flag that would make it so public errors are not logged.