serpy
serpy copied to clipboard
Exceptions are not easy to trace
Because serpy uses a simple approach of using builtin type functions, exceptions are hard to trace back.
For example, data is a string expected to be casted into integer, if int function fails, the exception will only say invalid literal for int() with base 10: '' which is easy to understand but hard to traceback.
What I propose is a small try except block in _serialize, that'll modify the exception to include serializer and field names. I believe, this'll improve error tracing and debugging vastly.