Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /api/v1/recipes error 500 #2625

Open
vincentxavier opened this issue Dec 29, 2024 · 2 comments
Open

POST /api/v1/recipes error 500 #2625

vincentxavier opened this issue Dec 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vincentxavier
Copy link

Description
When POSTing a recipe using the API described in https://nextcloud.github.io/cookbook/dev/api/0.1.2/index.html#/Recipes/newRecipe the server reply with a 500 error

Reproduction
Steps to reproduce the behavior:

  1. Download a recipe using GET api
  2. change name an remove id
  3. POST the recipe
  4. 500 error

I've also tested with some computer-crafted JSON file (extracted from a web site using a python library). If I upload the same JSON file to the Recipe folder and update the database, the recipe is shown in the frontend.

I've inspect the server log and I've got Could not parse recipe ingredients. It is no array. which is strange.

Here's a formated version of the recipe.json I've used : recipe.json

Versions
Nextcloud server version: 29.0.7.1
Cookbook version: 0.11.2
Database system: PostgreSQL

@vincentxavier vincentxavier added the bug Something isn't working label Dec 29, 2024
@saywebsolutions
Copy link

I'm not able to replicate using the recipe.json payload you've shared; I'd double check you've not accidentally malformed the json that you were attempting to POST

@vincentxavier
Copy link
Author

I've reproduced it with the corrected version from https://nextcloud.github.io/cookbook/dev/api/0.1.2/index.html#/Recipes/newRecipe
this yield a 500 error in apachelog, but nothing in nextcloud.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants