Skip to content

Bug: /feedback endpoint missing in Flask ML API — Node forwards to a 404 #196

Description

@Harshada-Yele

Bug Report

Node's /feedback route (in server.js) forwards requests to
${ML_API_BASE}/feedback, but backend/app.py only defines:

  • /
  • /health
  • /predict

There is no /feedback route in Flask. Any feedback submission
Currently returns a 404 from Flask, relayed to the frontend as an error.

Impact

The feedback feature documented in the README isn't working.

Proposed Fix

Add a minimal POST /feedback route to app.py that:

  • Accepts { text, predicted_label, correct_label }
  • Validates correct_label is one of ham, spam, or smishing
  • Appends to feedback_store.csv
  • Returns 201 on success, 400 on invalid data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions