Skip to content

Conversation

saurabh-pingale
Copy link
Contributor

Closes #9434

Problem Summary
Currently, when a user tries to save a workflow using a filename that contains characters forbidden by the operating system (e.g., a colon : on Windows), the save operation fails silently. The UI provides no warning or error message, leading the user to believe the workflow was saved successfully. This can result in the unintentional loss of work when the user later tries to load the non-existent file.

Solution
This PR addresses the issue by adding error handling to the backend post_userdata endpoint.

  1. Added Exception Handling: The file-writing operation is now wrapped in a try...except OSError block.
  2. Informative Error Response: If an OSError is caught (which occurs with invalid filenames), the server now returns a 400 Bad Request status code along with a clear, user-friendly error message.

This ensures that the frontend receives a specific error it can display to the user, immediately notifying them of the problem so they can correct the filename and save their work successfully.

Screenshot
Screenshot 2025-08-20 145632

@comfyanonymous comfyanonymous merged commit 0737b7e into comfyanonymous:master Aug 21, 2025
6 checks passed
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.

Workflow Save accepts non file characters
2 participants