Handle errors in external calls