throw API exception instead of internal