langflow/src/backend
Gabriel Luiz Freitas Almeida d41d740768
fix: make errors in build_flow function use the standardized ErrorMessage schema (#5199)
* fix: enhance error handling in build_flow function by utilizing ErrorMessage schema

- Introduced ErrorMessage schema to standardize error reporting in the build_flow function.
- Updated error handling to include flow_id, session_id, and trace_name for better context in error messages.
- Improved clarity and maintainability of error handling logic across multiple exception cases.

* Remove session_id from ErrorMessage in chat endpoint

* fix: enhance error handling in build_flow function by checking for custom component existence

Updated the error handling logic in the build_flow function to safely access the trace_name of the custom component. This change ensures that if the custom component is not present, the trace_name will be set to None, improving the robustness of error reporting.

* fix: update ErrorMessage schema to allow optional session_id and source

- Modified the ErrorMessage class to accept optional parameters for session_id and source, enhancing flexibility in error reporting.
- Updated the initialization logic to handle None values for sender and component attributes, ensuring robustness in cases where source may not be provided.

* fix: improve error handling in build_flow function by using getattr for trace_name

Updated the error handling logic in the build_flow function to utilize getattr for safely accessing the trace_name attribute of the custom component. This change ensures that if the custom component is not present, trace_name will default to None, enhancing the robustness of error reporting.
2024-12-18 15:04:25 +00:00
..
base fix: make errors in build_flow function use the standardized ErrorMessage schema (#5199) 2024-12-18 15:04:25 +00:00
langflow/version ref: Apply ruff rule RUF052 (#5089) 2024-12-08 11:51:02 +00:00
tests feat: Bump blockbuster version to 1.5.2 (#5331) 2024-12-18 14:43:31 +00:00
.gitignore Changes default location for the database and adds the option to use the previous behavior (#1907) 2024-05-15 20:41:01 -03:00
Dockerfile Update Docker image references to langflowai in GitHub workflows and Docker Compose files (#1793) 2024-04-29 13:38:18 -03:00