it is recommended to have the smallest possible scope for try exception wraps. probably better to have the except right after the call_api.