By the error, it could be something wrong with the definition of this app.delete method.
Does your backend log any error in the terminal when you test this endpoint?
If everything is correct in your code, the error could be the ID you are passing in the URL.
As this is just a simple tutorial and I wanted it to be short, it does not have validations but, in a final application, it should contain a lot of validations on the data we are trying to execute actions.
My suggestion to you is to check if the ID you are passing to the URL http://localhost:5000/api/product/<YOUR-PRODUCT-ID> is a valid ID.
Let me know if this helped you solve the problem and do not hesitate to ask if you have more questions.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Csaba,
By the error, it could be something wrong with the definition of this app.delete method.
Does your backend log any error in the terminal when you test this endpoint?
If everything is correct in your code, the error could be the ID you are passing in the URL.
As this is just a simple tutorial and I wanted it to be short, it does not have validations but, in a final application, it should contain a lot of validations on the data we are trying to execute actions.
My suggestion to you is to check if the ID you are passing to the URL
http://localhost:5000/api/product/<YOUR-PRODUCT-ID>
is a valid ID.Let me know if this helped you solve the problem and do not hesitate to ask if you have more questions.