On 11/02/2021 19.29, mtp...@gmail.com wrote:

I have implemented the following view but saving the images part is an issue:


What's the issue? Knowing that would make it easier for someone to help you.

Having a quick look at the code, I would start by removing the try/except block until you have a way to actually handle the errors you expect to encounter.

Currently you either ignore exceptions making it impossible to debug errors, or catch them and tell the client/user that they're to blame for whatever unknown exception was raised (with a 400 status code) without leaving any trace of what actually went wrong for you to fix. That's not error handling.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8eabb032-3867-cadc-a74b-dcf9256ad6e9%40stacktrace.dk.

Reply via email to