Managing errors and hiding api from end users