Skip to content

Display user-friendly error messages for AI generation failures #64

Description

@AdityaB2731

Is your feature request related to a problem? Please describe.
Currently, when AI diagram generation fails, OpenFlowKit displays the complete raw API error response to the user.

While this information may be useful for debugging, it is difficult for non-technical users to understand and exposes unnecessary implementation details.
For example, if the configured AI model is unavailable, users see an error similar to:

models/gemini-3-pro is not found for API version v1beta...

along with additional API-specific details such as service names, status codes, and internal messages.

Describe the solution you'd like
Display a user-friendly error message instead of the raw API response.

For example:

Unable to generate the diagram

The selected AI model is unavailable or no longer supported.

Please try again later or select another available model.

Optionally, a simplified error code (e.g., Error Code: 404) could be shown for reference, while the complete API response is logged to the browser console for debugging.

Describe alternatives you've considered
An alternative would be to show only the HTTP status code (e.g., 404 - Model Not Found) instead of the full API response. However, replacing the raw error with a clear, human-readable message would provide a better experience for both technical and non-technical users while still allowing developers to inspect detailed errors in the browser console.

Additional context
Environment:
OS: Windows 11
Browser: Brave
Screenshot of the current behavior is attached below.

This enhancement would improve the overall user experience by making error messages easier to understand while avoiding the exposure of unnecessary backend implementation details.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions