Skip to content

Remove raw error responses from server #3954

@Iron-56

Description

@Iron-56

p5.js version

any

What is your operating system?

None

Web browser and version

No response

Actual Behavior

In many files, the server responds with raw errors using res.status(500).json({ error: err }) which could leak internal stack traces, internal DB messages or sensitive information.

Expected Behavior

Return a simple message instead of returning the stack trace: res.status(500).json({ error: 'Internal server error' });

Steps to reproduce

Uncaught errors in the code which are caught using these code could respond with sensitive info

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions