Skip to content

[BUG] - Missing error message when import fails #5272

Open
@stickermajom

Description

@stickermajom

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

No error message is shown while trying to import a recipe from an incorrectly formatted JSON.

Steps to Reproduce

  1. Open Mealie and try importing the following from JSON
  2. {
    "name": "Palacsinta",
    "description": "Klasszikus magyar palacsinta recept.",
    "ingredients": [
    {"name": "Liszt", "amount": 200, "unit": "g"},
    {"name": "Tojás", "amount": 2, "unit": "db"},
    {"name": "Tej", "amount": 3, "unit": "dl"},
    {"name": "Ásványvíz", "amount": 2, "unit": "dl"},
    {"name": "Só", "amount": 1, "unit": "csipet"},
    {"name": "Olaj", "amount": 0.75, "unit": "dl"}
    ],
    "instructions": [
    "A lisztet egy tálba szitáljuk.",
    "Hozzáadjuk a tojásokat, majd folyamatos keverés mellett a tejet és az ásványvizet.",
    "Belekeverjük a sót és az olaj felét.",
    "A masszát csomómentesre keverjük, majd 10-15 percig pihentetjük.",
    "Egy serpenyőt vékonyan kiolajozunk, és a palacsintákat egyenként kisütjük."
    ],
    "tags": ["desszert", "magyar", "palacsinta"],
    "prepTime": "10 perc",
    "cookTime": "20 perc",
    "servings": 4
    }
  3. Click Create, nothing will happen.

Please provide relevant logs

Even with DEBUG logging enabled you'll only get back a 400 error in the logs:
INFO 2025-03-21T07:44:52 - [192.168.1.36:0] 400 Bad Request "POST /api/recipes/create/html-or-json HTTP/1.1"

Mealie Version

2.7.1; 2.8.0

Deployment

Docker (Linux)

Additional Deployment Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions