Pass API errors along through an exception