The `api.exception` method, which is internally also used by `api.exception_handler` helper, calls `sys.exit` and this no statement after a call to either method should be reached. Add an assertion to make sure of that.