NEXT
NEXT copied to clipboard
Clean up App exception handling [WIP]
I don't understand, why were the try except blocks pulled out? This was the only good way of bubbling app level exceptions up to the user through the api?
@lalitkumarj The try-except blocks had essentially duplicated code in each, so the exception handling was moved into tasks.py, where each of the app functions is called.
This is done by wrapping every call to an app function in this decorator, which performs the same error checking/logging as the original blocks.
Just to make sure, this propagates back to the user right (ie you get an error as a response to the api call?).
Lalit
On Mon, Jul 10, 2017 at 11:42 AM, Liam Marshall [email protected] wrote:
@lalitkumarj https://github.com/lalitkumarj The try-except blocks had virtually duplicated code in each, so the exception handling was moved into tasks.py, where each of the app functions is called. This is done by wrapping every call to an app function in this decorator https://github.com/nextml/NEXT/pull/192/files#diff-5806b38ec37128c1df1ceecced84a9d9R42, which performs the same error checking/logging as the original blocks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nextml/NEXT/pull/192#issuecomment-314146345, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWhGBgBcy_Rt-7HaWxpASQ61n7vHJkUks5sMkZygaJpZM4N7gea .