1👍
You should never pass the exceptions to client as it could potentially leak some sensitive information.
Anyway during the development process just raise an exception, so it will print the whole traceback so you can see the context of what/where exactly the problem is. It wont work with the JSON in browser as you would expect, but you can display the raw response in browser’s developer tools.
Source:stackexchange.com