[#82063658] Standardize error handling

Being specific about where the errors are raised so that clients can rescue the correct error.

-- CT