[#82063658] Standardize error handling

Being specific about where the errors are raised so that clients can rescue the correct error.

-- CT
Should a gem like this have a `.ruby-version` checked in? I can see how it's useful for development, but perhaps that should be a concern of the individual developer.