FIX: error handling sql API issue #129