processing / processing/p5.js-web-editor

Bug: CollectionCreate form does not display error message when collection creation fails

Open
#3,948 3 comments 0 reactions 1 assignee View on GitHub

@pranjal270 is already working on this.

Since Mar 10, 2026.

Bug
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

p5.js version

No response

What is your operating system?

Windows

Web browser and version

chrome://145.0.7632.117

Actual Behavior

In the collection creation form, the error handling logic for creating a new sketch collection is incomplete. The local state creationError is defined but never updated when the createCollection action fails.

When collection creation fails (e.g., due to a network error or backend validation failure), no error message is shown to the user because creationError remains undefined. The createCollection action dispatches an ERROR action on failure, but the component neither listens to this state nor catches the error.

Expected Behavior

The component should display an appropriate error message when collection creation fails.

This can be achieved either by:

  • reading the error state from Redux, or

  • modifying the action to return a rejected Promise so the component can catch it and set its local creationError state to true.

Steps to reproduce

###Steps:

  1. Navigate to the Collection Creation page.
  2. Intercept the network request to the /collections endpoint and force it to fail (for example, return a 500 error).
  3. Attempt to create a collection.
  4. Observe that no error message is displayed despite the failure.
Snippet:
// TODO: error is never set!
// eslint-disable-next-line no-unused-vars
const [creationError, setCreationError] = useState();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.