Skip to content

"[BUG]: 500 Internal Server Error on Backend for /templates/create and /forms/fill #293

@Mahendrareddy2006

Description

@Mahendrareddy2006

name: 🐛 Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: 500 Internal Server Error on Backend for /templates/create and /forms/fill"
labels: bug
assignees: ''

⚡️ Describe the Bug

When testing the FastAPI endpoints /templates/create and /forms/fill, the API works correctly in the local development environment but returns a 500 Internal Server Error when executed on the backend/deployed environment.

The error does not provide clear details, making it difficult to diagnose the root cause.


👣 Steps to Reproduce

  1. Send a POST request to /templates/create or /forms/fill
  2. Provide a valid JSON request body
  3. Execute the request on the backend (deployed environment)
  4. Observe the response

📉 Expected Behavior

The API should process the request successfully and return a valid JSON response, similar to the behavior observed in the local environment.


🖥️ Environment Information

  • OS: Windows (local), Backend environment unknown (likely Linux-based)
  • Docker/Compose Version: Not used / Not applicable
  • Ollama Model used: Not directly related (issue occurs at API level)

📸 Screenshots/Logs

  • API returns: 500 Internal Server Error
  • No detailed error message is returned in the response.
  • Works correctly in local environment but fails in backend.

🕵️ Possible Fix

  • Improve error handling and logging for backend failures
  • Ensure all dependencies (e.g., sentence-transformers, faiss-cpu) are installed in backend environment
  • Handle model loading failures gracefully (e.g., when model is not available or cannot be downloaded)
  • Check file write permissions for generated files (e.g., FAISS index, local storage)
  • Return meaningful error messages instead of generic 500 responses

🔗 Additional Context

This issue may be related to existing backend error handling issues such as:

The problem appears to be environment-specific rather than a logic error in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions