Skip to content

Conversation

@Abhinaya-P
Copy link
Contributor

@Abhinaya-P Abhinaya-P commented Jan 18, 2026

Fixes #5647

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Abhinaya-P, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the robustness of error handling within the getChatflowById service. The primary goal is to prevent the masking of specific error types, particularly those indicating a resource not found, by ensuring that existing InternalFlowiseError objects are propagated as-is. This modification leads to more precise error reporting to API consumers, improving the clarity and debuggability of issues related to invalid resource identifiers.

Highlights

  • Improved Error Propagation: The error handling in the getChatflowById service function has been refined to ensure that specific InternalFlowiseError instances are re-thrown directly, preserving their original status and context.
  • Accurate Status Codes: This change prevents specific errors, such as a 404 'Not Found' for an invalid ChatFlowId, from being inadvertently converted into a generic 500 'Internal Server Error', leading to more accurate API responses.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the error handling in getChatflowById to re-throw InternalFlowiseError instances, preventing them from being wrapped in a generic 500 error. This is a good change for preserving specific error details. My feedback points out that this might not cover all cases of invalid IDs, specifically those with an invalid format that cause a database error, which would still result in a 500 error. I've suggested a more robust validation approach to ensure consistent 404 responses.

@Abhinaya-P
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively resolves an issue where invalid chatflowIds caused a 500 Internal Server Error. By adding UUID validation and correctly propagating InternalFlowiseError, the API now returns appropriate 400 and 404 status codes. The fix is well-implemented. I've added a minor suggestion to make the error message for malformed IDs more descriptive. I also recommend applying this error handling pattern to other service functions in the future for consistency.

@Abhinaya-P Abhinaya-P changed the title Retain the original error as 404 when URI contains invalid ChatFlowId Retain the original error as 404/400 when URI contains invalid ChatFlowId Jan 18, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@HenryHengZJ HenryHengZJ merged commit a6282b9 into FlowiseAI:main Jan 20, 2026
2 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.

Incorrect Response Code in /api/v1/prediction/{flowId} API

3 participants