abstracting-fastapi-services
abstracting-fastapi-services copied to clipboard
Why to use "with" statement for raising errors?
https://github.com/visini/abstracting-fastapi-services/blob/adacaba43609a0f46d1baf315d0288ae1a6c3d33/app/utils/service_result.py#L41
I don't understand either. It didn't come across as obvious to me that we had to use a context manager for this case. We even only have 'pass' in the exit( ) method.